Commit Graph

1174 Commits

Author SHA1 Message Date
chimp1984
108ca75097
Rename HISTORY to HISTORICAL_RESOURCE_FILE_VERSION_TAGS to make its usage more clear 2020-10-21 09:21:53 +02:00
chimp1984
8bb1c61c76
Fix wrong HISTORY version entry.
This fields contains the versions where we have tagged a resource file.
It does not need to be the latest version in case we have not added a new resource file.
2020-10-21 09:21:46 +02:00
Christoph Atteneder
7ae6e84e02
Bump version number for v1.4.1 2020-10-18 19:22:53 +02:00
chimp1984
0b38fccfd2
Add file name to temp file at write to disk 2020-10-16 13:27:21 -05:00
chimp1984
0d469066ce
Change write json files to disk strategy
We have written all files each time at each new block which accumulated to about
1 GB of data, this led to stability issues and very high disk IO for the explorer nodes.

Now we write only the data of the new block. We also remove the deletion of all
files at startup.
The dao state is still written in a monolithic file so that cannot be optimized
but we added a new directly where we add each block named by block height.
Looking up the latest written file tells us our last persisted block.
So all that data is equivalent to the monolithic daoState data which should
be removed once the webapp devs have implemented the change to use the blocks directory.
2020-10-12 23:51:15 -05:00
chimp1984
39c8ade5ef
Cleanups: Remove outdated TODOs, fix typos 2020-10-08 22:00:57 -05:00
chimp1984
fa374b99fb
Do conversion in a thread to not block UI thread. takes about 4 seconds on my machine.
Add shutdown method to TradeStatisticsConverter and call it via TradeStatisticsManager. Now as we have a reference to TradeStatisticsConverter in we don't need the hack anymore in applyInjector.
Set log level for com.neemre.btcdcli4j.core.client.ClientConfigurator to error as there is an expected warn log because of the outdated version.
2020-10-08 18:49:14 -05:00
chimp1984
00bed02839
Add TradeStatistics3 and related classes
Add TRADE_STATISTICS_3 Capability
Add TradeStatistics3 to proto resolvers
Make message TradeStatistics2 deprecated
2020-10-08 18:48:17 -05:00
chimp1984
6e3fdbc96a
Apply codacy suggestions 2020-10-08 18:23:04 -05:00
chimp1984
4f685f8f4b
When updating the capability from a reported peer we check if the reported one has higher capabilities, otherwise we ignore it. 2020-10-08 18:23:04 -05:00
chimp1984
cf0693098f
Update common/src/main/java/bisq/common/app/Capability.java
Co-authored-by: sqrrm <sqrrm@users.noreply.github.com>
2020-10-08 18:23:02 -05:00
chimp1984
9404e8fa87
Add NO_ADDRESS_PRE_FIX capability.
Add `boolean contains(Capability capability)` method
2020-10-08 18:23:00 -05:00
Christoph Atteneder
5294820eb6
Bump version number for v1.4.0 2020-10-08 09:39:01 +02:00
chimp1984
e179ee4e32
Use Collection for constructor which is called from the fromProto methods.
We do not set the collection as list but we fill the list created via the createList method.
2020-10-04 16:13:45 -05:00
chimp1984
c797317c0d
Fix typo 2020-10-04 16:05:43 -05:00
chimp1984
f9f33aa16d
Add PersistableListAsObservable
Remove ObservableList methods from PersistableList
Let DisputeList and TradableList extend PersistableListAsObservable
Fix param names
2020-10-04 13:18:25 -05:00
chimp1984
0cc0cfc9a5
Use runAfter instead of runPeriodically 2020-10-04 12:54:27 -05:00
chimp1984
3b31dc9ff3
Fix typo 2020-10-04 12:53:20 -05:00
chimp1984
a612405d9d
Update common/src/main/java/bisq/common/persistence/PersistenceManager.java
Co-authored-by: sqrrm <sqrrm@users.noreply.github.com>
2020-10-04 12:49:02 -05:00
chimp1984
c9cd58a378
Fix rename mistakes 2020-10-03 12:48:23 -05:00
chimp1984
e9db7c6808
Rename Priority to Source. This should make it more clear what is the intention of the usage.
Rename:
LOW to NETWORK
MID to PRIVATE_LOW_PRIO
HIGH to PRIVATE

Change delay of MID/PRIVATE_LOW_PRIO from 30 min to 2 hours (we had different datastores before using it, now its only real low prio stores)

Add comment to each enum
2020-10-03 12:48:23 -05:00
chimp1984
137b5e81d1
Enforce that clients set the priority. Remove the initialize methods which did not have priority as a param.
Make initializePersistenceManager in StorageService abstract to enforce in concrete class to define priority.

Change priorities for future renaming to a different meaning. instead of priority we want to describe the category: private data, public data,.... will come in next commit
2020-10-03 12:48:22 -05:00
chimp1984
18f64d53ca
Persist all Priority.HIGH stores at shutdown to be more safe that we did not miss any state update.
Priority.HIGH stores are all those which contain private data. Others can be rebuilt from network data or are not critical like navigationPath.
2020-10-03 12:48:22 -05:00
chimp1984
10e9b054a0
Rename writeCompleted to onWriteCompleted
Add comment
Use decrementAndGet instead of getAndDecrement

Tested cases when there is an exception at write to disk, but as we call the result handler in the finally clause we get always called onWriteCompleted, so it cannot happen that we get stuck.
2020-10-03 12:48:22 -05:00
chimp1984
232fa8ddee
Execute result handler on userThread 2020-10-03 12:48:22 -05:00
chimp1984
c789650d0b
Move methods to base class 2020-10-03 12:48:22 -05:00
chimp1984
ccfda5b043
Cleanups, add generics, add final, remove unused code/comments/todos, 2020-10-03 12:48:21 -05:00
chimp1984
fa0d261397
Fix remaining issues, cleanups, add persit calls, remove unused code,...
Sorry too tired to create another 20 commits...
2020-10-03 12:48:21 -05:00
chimp1984
197e871a7b
Remove FileManager ans Storage. All is replaces not by PersistenceManager 2020-10-03 12:48:20 -05:00
chimp1984
1e91b09f7d
Remove persist method 2020-10-03 12:48:18 -05:00
chimp1984
074ed6753b
Remove lombok Delegate from PersistableList
Add final
Add setAll method
Remove Iterable interface
2020-10-03 12:48:17 -05:00
chimp1984
3a348d5a0f
Remove ThreadedPersistableEnvelope and use PersistableEnvelope instead
We will not need threading support anymore once we use the new persistenceManager as serialisation is done on the userThread.
2020-10-03 12:48:16 -05:00
chimp1984
d3be8dd48b
Remove UserThreadMappedPersistableEnvelope and use PersistableEnvelope instead
We will not need threading support anymore once we use the new persistenceManager as serialisation is done on the userThread.
2020-10-03 12:48:16 -05:00
chimp1984
35d9338615
Remove UserThreadMappedPersistableList and use PersistableList instead
We will not need threading support anymore once we use the new persistenceManager as serialisation is done on the userThread.
2020-10-03 12:48:15 -05:00
chimp1984
937c006d73
Add PersistenceManager class 2020-10-03 12:48:15 -05:00
chimp1984
92c9c3cd7e
Add getDefaultStorageFileName method 2020-10-03 12:48:15 -05:00
chimp1984
85b33bcfce
Remove awaitTermination
Remove UserThread.execute on shutdown
Rename threadname
2020-10-03 12:48:15 -05:00
chimp1984
6f6836f733
Refactor: Add removeAndBackupFile method 2020-10-03 12:48:15 -05:00
chimp1984
d27e4dc249
Refactor: Rename fields and methods, return early 2020-10-03 12:48:14 -05:00
chimp1984
802dcad2fb
Refactor: Rename CorruptedDatabaseFilesHandler 2020-10-03 12:48:14 -05:00
chimp1984
cda9d9eccf
Refactor: Move other 2 classes to file package 2020-10-03 12:48:14 -05:00
chimp1984
23507102dd
Refactor: Move CorruptedDatabaseFilesHandler 2020-10-03 12:48:14 -05:00
chimp1984
8aff1f8665
Refactor: Move FileUtil 2020-10-03 12:48:14 -05:00
chimp1984
25a7979b02
Merge branch 'master_upstream' into reduce-initial-date-request 2020-10-02 13:05:56 -05:00
chimp1984
f5862ec2f6
UserThread must not be used before application is created. 2020-10-01 23:01:49 -05:00
chimp1984
3df2f7e177
Add HISTORY field. Make isNewVersion public 2020-10-01 15:06:34 -05:00
chimp1984
df90b2440a
Add new methods and refactor APIs. Needed later for new classes.... 2020-10-01 15:02:44 -05:00
chimp1984
ff1380481d
Merge branch 'master_upstream' into improve-startup-routines
# Conflicts:
#	core/src/main/java/bisq/core/app/BisqSetup.java
2020-10-01 10:34:43 -05:00
chimp1984
9fce06832d
Rename baseCurrencyNetworkParameters to networkParameters 2020-10-01 09:46:11 -05:00
chimp1984
0af9e133a4
Cleanups 2020-10-01 09:42:33 -05:00