Commit Graph

6928 Commits

Author SHA1 Message Date
HenrikJannsen
97ba1560be
Improve receiver distribution to avoid that legacy BM gets outputs if some outputs fall below the min. amount limit.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
fa4c952409
Apply code review feedback
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
eeaafc1e04
Use HashSet instead Lists.
Remove sorting as not needed.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
7cbc5d6263
Increase ISSUANCE_BOOST_FACTOR to 3
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
4ce6ce745a
Add check for isActivated and if not return LEGACY_BURNING_MAN_BTC_FEES_ADDRESS
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
4e08bcd53d
Split up legacy BM into DPT and BTC fee BM
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
d30ec07d94
Cleanup/add comments
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
8ab2582db6
Use check for isRegtest instead of test for isDevTesting to set dev parameters
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
0e79582819
Refactoring: Move isActivated method to BurningManService
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:14 -05:00
HenrikJannsen
dff6d48333
Refactoring: Move BM model classes into model package. Adjust visibility.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:14 -05:00
HenrikJannsen
c1dc317783
Remove unused methods
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:14 -05:00
HenrikJannsen
d31493b1e9
Use TradeWalletService.MIN_DELAYED_PAYOUT_TX_FEE as min value for miner fee in DelayedPayoutTxReceiverService.getSpendableAmount
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:14 -05:00
HenrikJannsen
d4646cc19f
Add LegacyBurningMan to UI
It is not included in BurningManCandidate candidate map as that would complicate things.
We only want to show it in the UI for informational purposes.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:14 -05:00
HenrikJannsen
883b0542a1
Fix getSnapshotHeight method
For chainHeights < genesisHeight+3*grid we ended up with future chainHeights

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:14 -05:00
HenrikJannsen
2b4b6fe715
Add logs for delayedPayoutTx receiver data
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:13 -05:00
HenrikJannsen
b7a5b569ca
Add legacy burningman to btc fee distribution in case we do not reach 100% from capped burn shares.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:13 -05:00
HenrikJannsen
c1b8871fda
Fix burn target calculations
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:13 -05:00
HenrikJannsen
3a7af07e86
Improve burn target calculation and display
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:13 -05:00
HenrikJannsen
c747a486a7
Fix duration calculations
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:13 -05:00
HenrikJannsen
3213c5e770
Avoid negative cycle index
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:13 -05:00
HenrikJannsen
683bc409c7
Use cycles for periods instead of blocks in months/years.
A cycle is the fundamental unit in the DAO, months/years have no relevance, so using
cycles as base helps avoids some potential weird behaviour with data getting updated at cycle events.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:13 -05:00
HenrikJannsen
2799ccabad
Add util class for cycle related methods with caching
Add getCycleAtIndex convenience method to DaoStateService

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:12 -05:00
HenrikJannsen
516004dfaf
Change ISSUANCE_BOOST_FACTOR to 3
Use lower dev test value for BURN_TARGET_BOOST_AMOUNT

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:12 -05:00
HenrikJannsen
1e8ec6f206
Add details if donationAddressOfDelayedPayoutTx check fails
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:12 -05:00
HenrikJannsen
625939b0f9
Bugfix: set burningManSelectionHeight and tradeTxFee at dispute clone
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:12 -05:00
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
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
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
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
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
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
Stephan Oeste
9e50066567
Remove KanoczTomas Bitcoin node, because it is permanet offline. 2022-12-11 15:28:32 +01: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
jmacxx
e2a23ee196
Change minimum payout at mediation from 2.5% to 5% of trade amount.
Implements bisq-network/proposals#397
2022-12-10 10:37:52 -06: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
HenrikJannsen
f98cd04fd8
Use LongValueItem instead of IntegerValueItem
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-09 08:54:28 -05:00
jmacxx
6f8bb00704
Apply code review suggestions. 2022-12-08 08:16:11 -06:00
HenrikJannsen
f4775f89b0
Add SeedNodeReportingService
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 13:23:28 -05:00
HenrikJannsen
3a4ed1fc01
Add seedNodeReportingServerUrl option
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:51:49 -05:00
HenrikJannsen
2c84f07ada
Add value objects and protobuf definitions
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:51:08 -05:00
HenrikJannsen
3caf2c2b64
Change visibility (will be used from monitor project).
Remove log, change log level.
Add getters

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:50:24 -05:00
HenrikJannsen
a925017e4b
Rename readCommitHash to findCommitHash, make it static and return optional.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-07 11:03:08 -05:00
jmacxx
09a7a09ec3
Fix FileTransferSession tests. 2022-12-06 20:33:48 -06:00
jmacxx
bddbe6b7ae
Feature to zip logfiles to home directory. 2022-12-05 09:14:12 -06:00
Christoph Atteneder
5dc006ec9b
Merge pull request #6435 from jmacxx/add_shutdown_guard
Prompt to confirm before shutting down.
2022-12-05 10:45:02 +01:00
jmacxx
75f224c67c
Check filterWarningHandler is set before use. 2022-12-04 21:10:06 -06:00
jmacxx
0e3314ce14
Prompt to confirm before shutting down. Has dont show again option. 2022-12-02 15:35:27 -06:00
Christoph Atteneder
4069e60f8c
Update app signatures 2022-12-01 12:21:46 +01:00
Christoph Atteneder
16166c42a7
Merge pull request #6429 from HenrikJannsen/handle-rpc-errors-gracefully
Handle HttpExceptions at block handler
2022-12-01 09:50:54 +01:00
jmacxx
7ec86c3dc3
User defined trade limit.
Some commits were missed from the first implementation in #6431.
The user limit is applied to offer entry via AccountAgeWitnessService.
Offers are filtered according to limits in OfferFilterService.
If limit changed, the cache in OfferFilterServices must be cleared.
2022-11-29 22:41:34 -06:00
jmacxx
c796531658
Increase trading limits as an opt-in setting (GH proposal 398)
More restrictive limits will still apply based on payment method.

It is intended to avoid that a new users who do not fully understand
the process of a Bisq trade to cause an arbitration case with high
amounts and therefore higher risks and costs for the DAO.
2022-11-29 09:32:38 -06:00
Alejandro García
8d2f0a5d12
Merge pull request #6383 from Android-X13/option_for_qr_codes
Include option for non-URI addresses in QR codes
2022-11-29 14:42:05 +02:00
Alejandro García
e054083c1f
Merge pull request #6376 from jmacxx/fix_issue_6367
Fix loss of mailbox messages during SPV resync
2022-11-29 14:41:27 +02:00
HenrikJannsen
0b07c104a7
Use recovery for all RPC HttpExceptions exceptions in generic error handler.
It seems that a reorgs or if a new block arrives quickly after another, that bitcoind is not ready
for a request and throws an RPC error, also the blockhandler throws that if the new block came too fast.
We try to request again with increasing delays up to 1 min. If after 10 attempts its still failing we
do a reorg and start parting again.
2022-11-27 17:42:53 -05:00
HenrikJannsen
a0900a0f1b
Handle HttpExceptions at block handler 2022-11-27 17:41:21 -05:00
sqrrm
b10881ff7f
Merge pull request #6418 from HenrikJannsen/improve-dao-node-domain
Improve dao node domain
2022-11-26 16:19:52 +01:00
jmacxx
8a94642e1a
Do not erase mailbox messages during SPV resync. 2022-11-25 21:13:09 -06:00
Alejandro García
92e4c62287
Merge pull request #6422 from jmacxx/fix_trade_timer_issue
Fix:  incorrect wallet tx handling
2022-11-26 03:02:05 +02:00
Alejandro García
80a927afb9
Merge pull request #6404 from HenrikJannsen/improve-dispute-validation
Improve dispute validation
2022-11-25 17:37:44 +02:00
Alejandro García
a6293a64cb
Merge pull request #6396 from jmacxx/show_commit_hash
Store the build's commit hash in Jarfile manifest
2022-11-25 17:36:34 +02:00
Android-X13
d77b76034d
Include option for non-URI addresses in QR codes 2022-11-22 23:11:45 +02:00
jmacxx
24ae5f6220
Make sure the actual wallet transaction is returned.
There was an issue with the transaction having a non-initialized
updateTime and/or blockTime because the wallet transaction was
not returned.
2022-11-21 09:39:21 -06:00
HenrikJannsen
671ab1f373
Cleanup
Improve toString methods

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-17 19:55:04 -05:00
HenrikJannsen
0f14ea29c9
Improve handling of case when Bitcoin Core sync is not completed.
We repeat with a quadratically increasing delay 5 times, then we give up.
In the previous code we repeated forever which could be risky in case that
code branch is called unexpectedly.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-17 19:51:15 -05:00
HenrikJannsen
811ae52f27
Fix bug with using getPreviousBlockHash instead of getHash
It had no consequences as it was only used for info logging

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-17 19:46:38 -05:00
HenrikJannsen
1e72e265f7
Cleanup comments
Improve toString methods
Rename var for more clear meaning

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-17 19:44:58 -05:00
HenrikJannsen
de654c15b3
Improve handling of ConnectionState.expectedInitialDataResponses
Rename to expectedInitialDataResponses as we compare with numInitialDataResponses.
Add comment to make it more clear how its used.
Let the LiteNode increment only if getBlocks get called (e.g. blocks are missing).

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-17 19:41:32 -05:00
Bisq GitHub Admin
60522218a7
Merge pull request #6412 from bisq-network/release/v1.9.6
Merge release branch
2022-11-15 21:03:40 +01:00
sqrrm
3dd9b0e575
Merge pull request #6403 from HenrikJannsen/disable-deactivation-of-dao
Require the DAO is enabled for traders
2022-11-04 11:44:26 +01:00
HenrikJannsen
81be778df3
Remove deposit tx output size check.
It is allowed that there are change outputs, for instance if taker
does not take full trade amount, there is a change output for maker.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-03 14:14:32 -05:00
HenrikJannsen
e653262751
Fix param in test
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-03 12:26:59 -05:00
HenrikJannsen
cba35b6342
Remove deposit tx output size check.
It is allowed that there are change outputs, for instance if taker
does not take full trade amount, there is a change output for maker.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-03 12:21:47 -05:00
HenrikJannsen
8d8cdc14b4
Cleanup 2022-11-03 12:12:02 -05:00