Commit Graph

6259 Commits

Author SHA1 Message Date
chimp1984
e2bf77fb59
Fixes https://github.com/bisq-network/bisq/issues/5762
Avoid that outdated donation and fee addresses are used.

In case we get an outdated donation address (RECIPIENT_BTC_ADDRESS)
we trigger a dao resync. The user get a popup for doing a restart
in that case.
For the fee address selection we do not fall back to the
RECIPIENT_BTC_ADDRESS in case no address from filter is provided
but we use the hard coded address of the current fee receiver address.
2021-11-09 20:42:30 +01:00
chimp1984
cf9e49134a
Add shutDown method to ClockWatcher and shut it down at shutdown 2021-11-09 20:00:34 +01:00
chimp1984
87f4444210
Add git lfs support for BsqBlocks in resources
Fix typo
2021-11-09 17:22:35 +01:00
chimp1984
1108e98164
Add isEmpty check 2021-11-09 13:01:21 +01:00
chimp1984
c600259267
Fix typo 2021-11-09 13:01:21 +01:00
chimp1984
97e356c79f
Add check that height of last block matches chainHeight from daoState 2021-11-09 13:01:21 +01:00
chimp1984
62b3e51b22
Cleanups, change log levels 2021-11-09 13:01:19 +01:00
chimp1984
3487932f6e
Remove unnecessary sorting
Blocks are always sorted by block height
2021-11-09 13:01:19 +01:00
chimp1984
a3fbdf48d2
Improve log 2021-11-09 13:01:19 +01:00
chimp1984
7c32587453
Persist bsq blocks as buckets of 1000 blocks
Improve logging

Add BsqBlockStore to protobuf

Remove DaoStateMonitoringService field

Do not persist the blocks in daoState anymore.

This improves persistence performance and reduces memory
requirements for snapshots.
2021-11-09 13:01:19 +01:00
chimp1984
699048634b
Avoid unnecessary serialisation/deserialisation cycle
For the snapshot we create a deep clone by protobuf serialisation.
We do not need the deserialisation back to the java object as it is
only kept in memory for later persistence where we need to do protobuf
serialisation again. So we can skip that cycle and safe a bit of
time at creating and persisting snapshots.
2021-11-09 13:01:19 +01:00
chimp1984
b619afa83d
Remove unused field 2021-11-09 13:01:18 +01:00
chimp1984
4d2d0717b5
Add getBlockTimeAtBlockHeight method
Improve getBlockStartDateByCycleIndex method
2021-11-09 13:01:18 +01:00
chimp1984
779bd0cf1e
Remove blockHashes set from daoState
Was only used from one use case which can be done differently.
2021-11-09 13:01:18 +01:00
Christoph Atteneder
65c308f5ed
Merge pull request #5782 from chimp1984/redesign-dao-state-monitoring
Redesign dao state monitoring [4]
2021-11-09 12:12:22 +01:00
chimp1984
7e1696b095
Fix typos, cleanups 2021-11-08 21:49:08 +01:00
Christoph Atteneder
00d7913bc6
Merge pull request #5055 from Jakub-CZ/button-buy-bsq
Add "Buy BSQ" button next to trade fee selector
2021-11-08 11:13:52 +01:00
Christoph Atteneder
12cd88ce32
Fix translations 2021-11-04 13:23:00 +01:00
chimp1984
84ff332aeb
Implement new behaviour for dao state monitoring and snapshotting
See https://github.com/bisq-network/bisq/issues/5779 for spec
2021-11-04 12:48:10 +01:00
chimp1984
5ccef962d0
Add pruneStore method
We set both data to null and call GC after persistence is done.
2021-11-04 12:48:09 +01:00
chimp1984
5a8a9e9be8
Delete DaoEventCoordinator (we will handle coordination in
DaoStateSnapshotService instead in next commits)

Let DaoStateSnapshotService implement DaoSetupService (impl in next commits)
2021-11-04 12:48:09 +01:00
chimp1984
8e3f95383e
Add daoStateBlockChainNotConnecting property (impl. will come in other commits)
Add Preferences to service classes
2021-11-04 12:48:09 +01:00
chimp1984
1f929926cc
Remove prevHash from StateHash classes (the prevHash was only used for display.
For creating the hash we take the hash from the previous element. By removing it
we safe about 3 MB on data)

Add isSelfCreated field to DaoStateHash (indicates if we have created
the hash by ourself or if we have received it from a peer -> will be
part of later commits)
2021-11-04 12:48:09 +01:00
chimp1984
1abe68637d
Add useFullModeDaoMonitor field to PreferencesPayload
Add toggle to PreferencesView
Set useFullModeDaoMonitor default to true for headless nodes
2021-11-04 12:48:08 +01:00
chimp1984
7b68686b28
Improve GcUtil
Increase duration for autoReleaseMemory from 60 to 120 sec.
Improve logging.
Add print stack trace when in dev mode to show caller for debugging/tuning.
Remove inefficient GC calls (based on test runs when no reduction occurred at those calls).
2021-11-04 12:48:08 +01:00
chimp1984
c559e6e044
Fix getCycleIndex method
The recursive version is very slow with more cycles.
2021-11-04 12:48:08 +01:00
chimp1984
d73bc55edf
Add method. Inline var 2021-11-04 12:48:08 +01:00
chimp1984
cd3e8217ae
Rename onChangeAfterBatchProcessing to onDaoStateHashesChanged
at DaoStateMonitoringService.Listener
2021-11-04 12:48:07 +01:00
chimp1984
3ac61c59f1
Cleanups, improve logs 2021-11-04 12:48:07 +01:00
Christoph Atteneder
928208c200
Merge pull request #5791 from jmacxx/fix_monese_satispay
Include holder name field for Monese & Satispay accounts
2021-11-04 10:54:12 +01:00
Christoph Atteneder
e17fd9ef54
Add informational popup after account creation 2021-11-04 10:46:37 +01:00
Christoph Atteneder
b7c4e5ed17
Create BSQ account and take offer if not existing
Conflicts:
	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java
	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java
	desktop/src/main/java/bisq/desktop/util/DisplayUtils.java
2021-11-04 10:46:27 +01:00
Christoph Atteneder
4063b72b7d
Add tooltip for disabled create offer button
Conflicts:
	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java
2021-11-04 10:40:16 +01:00
Christoph Atteneder
d6cd83ae88
Improve informational popup 2021-11-04 10:37:00 +01:00
Christoph Atteneder
35e76e30b2
Add Button to confirm payment in BSQ wallet 2021-11-04 10:36:01 +01:00
Christoph Atteneder
6692ce574c
Improve wording
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2021-11-04 10:36:00 +01:00
Jakub Loucký
4c77044274
Move button style to bisq.css
Add link to bisq.wiki
2021-11-04 10:28:57 +01:00
Christoph Atteneder
f59d6fe591
Add "Buy BSQ" button next to trade fee selector
Conflicts:
	desktop/src/main/java/bisq/desktop/main/offer/OfferView.java
2021-11-04 10:28:30 +01:00
Christoph Atteneder
26e75413d7
Fix mixed usage of static import to pacify Codacy 2021-11-04 09:31:53 +01:00
chimp1984
1ca0ed5e36
Add notification when BSQ swap trade got confirmed 2021-11-04 01:20:50 +01:00
chimp1984
8fa66ea7aa
Moved instance methods to ClosedTradableManager
Renamed ClosedTradeUtil to ClosedTradableUtil

Leaves only static functional methods in ClosedTradableUtil
Domain methods requiring services are in ClosedTradableManager
This keeps also the TradableList

All formatting code is in ClosedTradableFormatter
2021-11-03 23:54:18 +01:00
chimp1984
27df58b336
Extract formatter methods to ClosedTradeFormatter 2021-11-03 23:12:13 +01:00
chimp1984
acf7c216ae
Moved PriceUtil to bisq.core.util 2021-11-03 22:02:21 +01:00
chimp1984
7109666047
Moved AltcoinValidator, FiatPriceValidator and NumberValidator
to bisq.core.util.validation package. No code change.

Is needed for next refactorings.
2021-11-03 21:58:53 +01:00
chimp1984
24f18b75ae
Rename txFeeAsLong to tradeTxFee and txFeeAsLong to txFeeAsLong
Implement getTxFee in concrete classes. For Maker trades we return the txFee from the offer.

We use txFee in 2 different context:
1. For the txFee the taker pays and which is used for all the trade txs
2. As generic tx fee the user has paid. The makers tx fee is in the offer.
   The taker pays 3 times the tradeTxFee
2021-11-03 21:52:04 +01:00
chimp1984
3023d5b353
Add confirmed state
Fix num trades
2021-11-03 20:47:35 +01:00
chimp1984
c4a8627183
Use TradeModel instead of Trade in the avatar icon
classes and comparators
Add bsq wallet balance listener to update list
Use BsqSwapTrade details window if Bsq trade
Show "N/A" for deposits in case of BSQ swaps
Cleanup ClosedTradesDataModel
2021-11-03 20:10:15 +01:00
chimp1984
ba64ba55e8
Add methods for confirmed and unconfirmed trades 2021-11-03 20:06:01 +01:00
chimp1984
792bbaa6f2
Rename BSQ Swap Trades to Unconfirmed BSQ Swaps 2021-11-03 20:03:14 +01:00
chimp1984
2ac5b3532c
Rename BSQ swap trades tab to Unconfirmed BSQ swaps
Move it left to closed trades
2021-11-03 19:06:06 +01:00