Commit Graph

16859 Commits

Author SHA1 Message Date
HenrikJannsen
a6a018883d
Add isDevTesting method for adjusting behaviour for dev testing purposes
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:12 -05:00
HenrikJannsen
4e25d2f253
Add isDevMode check to set dev params
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:12 -05:00
HenrikJannsen
402c4075d0
Add option to add opReturn data at BSQ wallet send screen for non-BSQ balance.
This can be used for providing proof of ownership of a genesis output when attaching a custom BM receiver address.
See: https://github.com/bisq-network/proposals/issues/390#issuecomment-1306075295

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:11 -05:00
HenrikJannsen
78d3fd8d44
Fix wrong initial value.
For myGenesisOutputNames we check for null not Optional.empty as empty is a valid case and we do not
want to wrap the optional field into another Optional.
Also myCompensationRequestNames is using a null check and gets reset to null instead of an
empty set as the empty set is a valid case as well.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:11 -05:00
HenrikJannsen
5799fb27eb
Add balance listener for burn bsq input
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:11 -05:00
HenrikJannsen
88cf28c526
Add applyBlock method and call at constructor (some classes get not initiated at app startup but created by UI activity).
Remove accumulatedDecayedBurnAmount at getAllowedBurnAmount. Was incorrect.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:11 -05:00
HenrikJannsen
fb51861c4b
Use months and not cycles for burn target and average.
Add checks for chainHeight to make code more generic (in the current usage its always last block anyway)

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:11 -05:00
HenrikJannsen
9fa9fbf57b
Fix incorrect cycle index
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:11 -05:00
HenrikJannsen
befe166bc7
Refactor out fields from BurningManCandidate which are not affecting data for delayed payout tx receivers.
This allows to split off the burn target related code to separate classes.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:11 -05:00
HenrikJannsen
52d48eb90a
Rename getDelayedPayoutTxReceivers to getReceivers
Cleanup

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
f0faa44804
Remove Current from method names
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
7724b5b3ea
Rename getBtcFeeReceiverAddress to getAddress
Cleanup

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
92b38ed20f
Move BurningManUtil.getLegacyBurningManAddress to BurningManService.
Remove BurningManUtil

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
508081ad16
Rearrange methods
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
ec25722d08
Split up calculateShare into 4 distinct methods
Reduce visibility to package scope

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
3fda949526
Add sorting for output index needed for genesis tx outputs.
Use static factory methods for the 2 diff. use cases of CompensationModel.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
24ccacd210
Remove unused fields
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:10 -05:00
HenrikJannsen
22f7b089f4
Remove reference to delayedPayoutTxReceiverService and btcFeeReceiverService inside BurningManService.
Use DelayedPayoutTxReceiverService and BtcFeeReceiverService in client code instead of BurningManService.
Make BurningManService package private.
2022-12-11 11:15:09 -05:00
HenrikJannsen
40a03ebdc5
Move getAverageDistributionPerCycle to BurningManService and use from BurningManInfoService.
Remove reference to BurningManInfoService inside BurningManService.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:09 -05:00
HenrikJannsen
559ba6e9b9
Refactor BurningManService
Split up into 4 service classes
- BurningManService: Common stuff
- BurningManInfoService: For displaying BurningMan data
- BtcFeeReceiverService: For getting btcFeeReceivers
- DelayedPayoutTxReceiverService: For getting delayedPayoutTxReceivers. This is the critical part where we need to have a deterministic data and which could break trade consensus.

WIP refactoring. More to come...

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:09 -05:00
HenrikJannsen
19067acbcd
Cleanup
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:09 -05:00
HenrikJannsen
7407ab87f9
Subtract accumulatedDecayedBurnAmount from allowedBurnAmount
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:09 -05:00
HenrikJannsen
58cabfaaf6
Add expectedRevenue to BurningManCandidate.
Add getAverageDistributionPerCycle method to BurningManService.
Show receiver address when BM is selected.
Refactor code, cleanups, UI improvements.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:09 -05:00
HenrikJannsen
731363d128
Sort getBtcFeeReceiverAddress by amount and address.
Increase minOutputAmount to 1000 sat.
Cleanups

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:08 -05:00
HenrikJannsen
fa857b39ec
Make codacy happy
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:08 -05:00
HenrikJannsen
02a163f2f1
Fix handling of null entries in getBtcFeeReceiverAddress method
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:08 -05:00
HenrikJannsen
e16a9b00b1
Add verifyDelayedPayoutTxReceivers method in RefundManager.
Add burningManSelectionHeight and tradeTxFee in Dispute.
Call validateDonationAddressMatchesAnyPastParamValues and validateDonationAddress
only if legacy BM was used.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:08 -05:00
HenrikJannsen
060b9c476e
Validate delayedPayoutTx outputs size and amount only if BurningManService.isActivated is false.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:08 -05:00
HenrikJannsen
7b280c4a99
Use Burningmen receivers for delayed payout tx.
Add verification by re-creating receivers and check txId of both DPTs.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:08 -05:00
HenrikJannsen
eee0b691d0
Remove FeeReceiverSelector and test as not used anymore
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:08 -05:00
HenrikJannsen
e2ce053a01
Add burningManSelectionHeight fields to OfferAvailabilityRequest, InputsForDepositTxRequest and ProcessModel.
Use BurningManService.getBtcFeeReceiverAddress at createFeeTx tasks.
Verify takers burningManSelectionHeight if BurningManService.isActivated at MakerProcessesInputsForDepositTxRequest and OpenOfferManager.
Stores burningManSelectionHeight in ProcessModel.
Add BurningManService fields to OfferAvailabilityModel, PlaceOfferModel, OpenOfferManager and Provider

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:07 -05:00
HenrikJannsen
39a49adb92
Add Burningman UI
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:07 -05:00
HenrikJannsen
5167f605b4
Add new addTableViewWithHeaderAndFilterField method to FormBuilder (will be used later)
Change return type of FormBuilder.addTableViewWithHeader

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:07 -05:00
HenrikJannsen
739ff8e447
Add BurningMan domain
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:07 -05:00
HenrikJannsen
ea5662f84d
Add new methods to DaoStateService and DaoFacade.
Will be used later by BurningMan domain.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:07 -05:00
HenrikJannsen
5c7a3308a7
Add burningManReceiverAddress as extraMap entry to CompensationProposal.
We cannot add a new field as that would break DAO consensus.

Add optional text field for burningManReceiverAddress to CompensationProposal UI.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:07 -05:00
HenrikJannsen
09a1af8f2c
Add allowEmpty flag to InputValidator and BtcAddressValidator
We will use that for the optional address field in compensation requests and interpret empty input as Optional.empty.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:06 -05:00
Alejandro García
6c7764fc33
Merge pull request #6451 from HenrikJannsen/avoid_sending_repeated_block_related_report_data
Avoid sending repeated block related report data
2022-12-11 17:38:00 +02:00
Christoph Atteneder
d1dc6c75af
Merge pull request #6453 from Emzy/remove-bitcoin-node
Remove KanoczTomas Bitcoin node, because it is permanet offline.
2022-12-11 15:43:51 +01:00
Stephan Oeste
9e50066567
Remove KanoczTomas Bitcoin node, because it is permanet offline. 2022-12-11 15:28:32 +01:00
HenrikJannsen
3920e81f1c
Add try catch at send (to cover case when thread pool is exhausted)
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-10 19:26:45 -05:00
HenrikJannsen
491c6a0861
Add onDaoStateBlockCreated method
Use onDaoStateBlockCreated instead of onDaoStateHashesChanged to avoid multiple calls when we receive hashes from other nodes.
Add daoStateMonitoringService listener after blockchain parsing is completed

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-10 19:19:29 -05:00
Alejandro García
1d67af6f40
Merge pull request #6449 from alvasw/introduce_gradle_version_catalog
Introduce Gradle Version Catalog
2022-12-09 19:47:39 +02:00
Alejandro García
cd3b69c0a6
Merge pull request #6446 from alvasw/upgrade_gradle
Update to Gradle 7.6
2022-12-09 19:47:06 +02:00
Alejandro García
2d607cd092
Merge pull request #6433 from jmacxx/user_trade_limits
User defined trade limit, Part II.
2022-12-09 19:46:34 +02:00
Alejandro García
67f4d34ae4
Merge pull request #6432 from HenrikJannsen/improve-seednode-monitoring
Improve seednode monitoring
2022-12-09 19:46:01 +02:00
HenrikJannsen
f98cd04fd8
Use LongValueItem instead of IntegerValueItem
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-09 08:54:28 -05:00
Alva Swanson
de600ddb30
Introduce Gradle Version Catalog
To simplify the build.gradle file, this change moves all version variables to
Gradle's version catalog.
2022-12-09 15:45:57 +02:00
Alva Swanson
80b10c88f6
Update to Gradle 7.6 2022-12-09 15:45:57 +02:00
HenrikJannsen
3308e35e8c
Add newCachedThreadPool to Utilities
Use newCachedThreadPool instead of getThreadPoolExecutor

Utilities.getThreadPoolExecutor use a BlockingQueue which prevents the intended
behaviour to increase the pool size to the max value.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-08 09:56:11 -05:00