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

Reduce initial request size #4233

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
ca88bc9
Bump version number for v1.3.8
ripcurlx Sep 3, 2020
d816967
Update translations for v1.3.8
ripcurlx Sep 3, 2020
ab2ac17
Add dontShowAgain button in osxKeyLoggerWarning window
chimp1984 Sep 3, 2020
688bef8
Rmove short cut info for removed key handlers
chimp1984 Sep 3, 2020
2da08a5
Refactor dependency structure to enable adding dispute managers
chimp1984 Sep 3, 2020
05296af
Add check if dispute is open
chimp1984 Sep 3, 2020
5732053
Enable onFiatPaymentReceived again (was for dev testing)
chimp1984 Sep 3, 2020
3359913
Ensure that p2p network and wallet are ready
chimp1984 Sep 3, 2020
a4a5f18
Make var local
chimp1984 Sep 3, 2020
11827a4
Set default services based on localhost check not on devMode check
chimp1984 Sep 4, 2020
e01ebdf
Change min required confirmations from 0 to 1.
chimp1984 Sep 4, 2020
33c8728
Add monero orange color code for tx confidence indicator
chimp1984 Sep 4, 2020
fa9893c
Show tx confidence indicator for XMR blocks. Show info icon
chimp1984 Sep 4, 2020
044d23f
Adjust auto-conf css for badge
chimp1984 Sep 4, 2020
63444b1
Add null check. Improve text
chimp1984 Sep 4, 2020
720b63f
Do not overwrite useDevMode with useDevModeHeader
chimp1984 Sep 4, 2020
2400014
Change hex color code to lower case
chimp1984 Sep 4, 2020
3e933c3
Fix bug with all mobile notifications for disputes are sent at startup.
chimp1984 Sep 4, 2020
f5d8f6d
Add new Monero Explorer node77.monero.wiz.biz with onion
wiz Sep 6, 2020
d55cc47
Fix compile error in core/src/main/java/bisq/core/user/Preferences.java
wiz Sep 6, 2020
38d33ce
Remove offer from takers offerbook after take offer is completed.
chimp1984 Sep 6, 2020
cc2d258
Scan disputes for accounts where same user used diff. real names.
chimp1984 Sep 5, 2020
67e90f9
Remove unused var
chimp1984 Sep 5, 2020
9cc614a
Add alert icon to list entries
chimp1984 Sep 5, 2020
e080b06
Remove unused method
chimp1984 Sep 5, 2020
05353bb
Add JsonExclude to userName
chimp1984 Sep 4, 2020
a4f6d2a
Add check if xmrTxProof is used to avoid null pointer exception
chimp1984 Sep 4, 2020
1a2b17b
Move revolutAccountsUpdateHandler code up to BisqSetup
chimp1984 Sep 4, 2020
9eb7900
Fix handling of username/accountId
chimp1984 Sep 4, 2020
b1b3136
Improve handling of nullable assetTxProof fields
chimp1984 Sep 6, 2020
05cc29d
Minor bug fixes for XMR tx proof feature
Sep 7, 2020
e704d02
Bug fixes
chimp1984 Sep 7, 2020
1c2a6a8
Create new HttpClient for each request.
chimp1984 Sep 7, 2020
39680ec
Remove DevTestXmrTxProofHttpClient
chimp1984 Sep 7, 2020
b937537
Resolve conflict in 6a061d2c5
chimp1984 Sep 7, 2020
82bc445
Remove DevTestXmrTxProofHttpClient
chimp1984 Sep 7, 2020
67fc398
Add note to SetXmrTxKeyWindow
Sep 7, 2020
f21019d
Change from http port 80 clearnet to https 443
Emzy Sep 7, 2020
a7b5cdb
Resolve merge conflict in Merge conflict in desktop/src/main/java/bis…
chimp1984 Sep 6, 2020
5ecbbf6
Resolve merge conflict in Merge conflict in desktop/src/main/java/bis…
chimp1984 Sep 6, 2020
cdf2698
Add comment to empty method
chimp1984 Sep 7, 2020
35cd7ac
Add check if trade have been dispute to protocol classes
chimp1984 Sep 7, 2020
f566e09
Use a checkArgument to ensure that the methods are not called once a
chimp1984 Sep 7, 2020
062c52d
Resolve merge conflict in Merge conflict in desktop/src/main/java/bis…
chimp1984 Sep 7, 2020
b3c3139
Ignore future results in case we had a terminal result already.
chimp1984 Sep 8, 2020
ca34f8e
Rearrange fields and improve toString method
chimp1984 Sep 8, 2020
0ee86b3
Improve text in UI in case of failure or error
chimp1984 Sep 8, 2020
edad9bd
Replace old Bisq Explorer URLs with new Mempool URLs for the 3 we have
wiz Sep 8, 2020
8949eaa
Tweak strings of "BSQ Explorer" -> "Bisq Explorer" and "Bitcoin Explo…
wiz Sep 8, 2020
dbefddf
Improve handling of p2pNetworkAndWalletReady
chimp1984 Sep 4, 2020
5a53cc6
Move remove code from shutDown to onP2pNetworkAndWalletReady
chimp1984 Sep 4, 2020
cc7e655
Use lots of regex to add http or https for XMR explorer API endpoint
wiz Sep 7, 2020
bafd116
Tweak string for "Service Addresses" to "Monero Explorer URLs"
wiz Sep 8, 2020
8cde8ce
Fix codacy complaining about missing space character
wiz Sep 8, 2020
e7016a3
Rename Monero Explorer to friendlier hostname explorer.monero.wiz.biz
wiz Sep 8, 2020
38299a9
Remove side effect in setUserName method and add extra handling for the
chimp1984 Sep 9, 2020
b7eef8c
Update data stores for v1.3.8
ripcurlx Sep 9, 2020
8dcb5da
Add new Monero explorer xmrblocks.bisq.services with onion
devinbileck Sep 10, 2020
ab5aee5
Revert Tether USD for now due to various issues
wiz Sep 10, 2020
cb9f0f0
Initial tests
freimair Apr 9, 2020
3296db3
Version helper uses real Bisq version
freimair Apr 15, 2020
e7831d6
Tests use static fixtures
freimair Apr 16, 2020
581286e
Migration test succeeds
freimair Apr 16, 2020
fc7a43d
GetMap test succeeds
freimair Apr 16, 2020
d111d8c
GetMapSinceFilter works
freimair Apr 16, 2020
6eda9a9
updateScenario works
freimair Apr 16, 2020
ff53f51
freshInstall scenario works
freimair Apr 16, 2020
49731f9
put scenario works
freimair Apr 16, 2020
e123a0b
Introduce SplitStore and Service to handle BL
freimair Apr 17, 2020
da5d41b
Moved file handling logic to SplitStoreService
freimair Apr 17, 2020
c7351a0
Activate other split data stores
freimair Apr 17, 2020
e2e80d7
Refactored tests
freimair Apr 20, 2020
10c1ecc
Initial tests for requests
freimair Apr 20, 2020
f6cea15
Requests are smaller
freimair Apr 20, 2020
0d80123
Prevent adding duplicate data
freimair Apr 24, 2020
aad57c3
Enforce version format and filter faulty ones
freimair Apr 24, 2020
faca8e4
Test incoming special keys from the future
freimair Apr 24, 2020
72600b1
Javadoc cosmetics
freimair Apr 24, 2020
3ad395b
Init integration test script
freimair Apr 29, 2020
2589137
Persist live database after split
freimair May 1, 2020
34abad0
Integration test script tests stock
freimair May 1, 2020
62a77e3
Use version history array
freimair May 1, 2020
39fcca5
Integration test script tests new system
freimair May 4, 2020
a3628ff
Use full sync between seednodes
freimair May 4, 2020
a374249
Cleanup integration test script
freimair May 4, 2020
8e55f64
Ignore some tests
freimair May 11, 2020
e927e6d
Adjust P2PDataStorage tests
freimair May 11, 2020
2fb2232
Add another migration test
freimair May 12, 2020
5f8b7cf
Reactivate ignored tests
freimair May 12, 2020
f8320fe
Refactoring and cleaning up
freimair May 20, 2020
017bbfd
Cleanup
freimair May 20, 2020
d2a6655
Refactored test helpers
freimair May 21, 2020
469c374
Fixed a potential issue when loading stores
freimair May 21, 2020
249e185
Fixed wrong filename
freimair May 22, 2020
06ec223
Refactoring
freimair May 22, 2020
eabadc0
Make special key platform-independent
freimair May 26, 2020
755fc03
Fixed persisting wrong data store
freimair Jun 12, 2020
d218f2e
Renamed data stores
freimair Jun 12, 2020
c34bfee
Replace TODO comment
freimair Jun 16, 2020
d6f195d
Fixed a timing issue
freimair Jul 1, 2020
d81bdab
Added 1.3.6 and 1.3.7 data stores
freimair Sep 1, 2020
abbfedc
Update history version list
freimair Sep 1, 2020
5f94406
Removed deprecated test mechanisms
freimair Sep 1, 2020
0eccec7
Cleanup imports
freimair Sep 1, 2020
270f1e7
Included PR feedback
freimair Sep 1, 2020
c8c63ef
Included PR feedback
freimair Sep 1, 2020
76cc37e
Added 1.3.8 data stores
freimair Sep 12, 2020
b4aae51
Use Version.VERSION again
freimair Sep 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added PreferencesPayload
Binary file not shown.
12 changes: 0 additions & 12 deletions assets/src/main/java/bisq/asset/coins/TetherUSDLiquid.java

This file was deleted.

12 changes: 0 additions & 12 deletions assets/src/main/java/bisq/asset/coins/TetherUSDOmni.java

This file was deleted.

11 changes: 0 additions & 11 deletions assets/src/main/java/bisq/asset/tokens/TetherUSDERC20.java

This file was deleted.

3 changes: 0 additions & 3 deletions assets/src/main/resources/META-INF/services/bisq.asset.Asset
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ bisq.asset.coins.Spectrecoin
bisq.asset.coins.Starwels
bisq.asset.coins.SUB1X
bisq.asset.coins.TEO
bisq.asset.coins.TetherUSDLiquid
bisq.asset.coins.TetherUSDOmni
bisq.asset.coins.TurtleCoin
bisq.asset.coins.UnitedCommunityCoin
bisq.asset.coins.Unobtanium
Expand All @@ -125,7 +123,6 @@ bisq.asset.coins.ZeroClassic
bisq.asset.tokens.AugmintEuro
bisq.asset.tokens.DaiStablecoin
bisq.asset.tokens.EtherStone
bisq.asset.tokens.TetherUSDERC20
bisq.asset.tokens.TrueUSD
bisq.asset.tokens.USDCoin
bisq.asset.tokens.VectorspaceAI
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ configure(project(':desktop')) {
apply plugin: 'witness'
apply from: '../gradle/witness/gradle-witness.gradle'

version = '1.3.7'
version = '1.3.8'

mainClassName = 'bisq.desktop.app.BisqAppMain'

Expand Down
16 changes: 15 additions & 1 deletion common/src/main/java/bisq/common/app/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

package bisq.common.app;

import java.util.Arrays;
import java.util.List;

import lombok.extern.slf4j.Slf4j;

import static com.google.common.base.Preconditions.checkArgument;
Expand All @@ -27,7 +30,18 @@ public class Version {
// VERSION = 0.5.0 introduces proto buffer for the P2P network and local DB and is a not backward compatible update
// Therefore all sub versions start again with 1
// We use semantic versioning with major, minor and patch
public static final String VERSION = "1.3.7";
public static final String VERSION = "1.3.8";

/**
* Holds a list of historical versions.
*
* Has been introduced with version 1.3.2. Prior versions did not need the history.
*
* The history of versions is used in the differential data store solution which
* was introduced to eliminate the need to rewrite all data to disk every time the
* data changes.
*/
public static final List<String> history = Arrays.asList("1.3.5", "1.3.6", "1.3.7");

public static int getMajorVersion(String version) {
return getSubVersion(version, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import bisq.network.p2p.storage.P2PDataStorage;
import bisq.network.p2p.storage.payload.PersistableNetworkPayload;
import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.network.p2p.storage.persistence.SplitStoreService;

import bisq.common.config.Config;
import bisq.common.storage.Storage;
Expand All @@ -36,7 +37,7 @@
import static com.google.common.base.Preconditions.checkArgument;

@Slf4j
public class SignedWitnessStorageService extends MapStoreService<SignedWitnessStore, PersistableNetworkPayload> {
public class SignedWitnessStorageService extends SplitStoreService<SignedWitnessStore> {
private static final String FILE_NAME = "SignedWitnessStore";


Expand All @@ -59,11 +60,6 @@ public String getFileName() {
return FILE_NAME;
}

@Override
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap() {
return store.getMap();
}

@Override
public boolean canHandle(PersistableNetworkPayload payload) {
return payload instanceof SignedWitness;
Expand All @@ -78,12 +74,4 @@ public boolean canHandle(PersistableNetworkPayload payload) {
protected SignedWitnessStore createStore() {
return new SignedWitnessStore();
}

@Override
protected void readStore() {
super.readStore();
checkArgument(store instanceof SignedWitnessStore,
"Store is not instance of SignedWitnessStore. That can happen if the ProtoBuffer " +
"file got changed. We cleared the data store and recreated it again.");
}
}
12 changes: 2 additions & 10 deletions core/src/main/java/bisq/core/account/sign/SignedWitnessStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@


import bisq.network.p2p.storage.P2PDataStorage;
import bisq.network.p2p.storage.payload.PersistableNetworkPayload;

import bisq.common.proto.persistable.ThreadedPersistableEnvelope;
import bisq.network.p2p.storage.persistence.SplitStore;

import com.google.protobuf.Message;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

import lombok.Getter;
import lombok.extern.slf4j.Slf4j;


Expand All @@ -40,10 +35,7 @@
* definition and provide a hashMap for the domain access.
*/
@Slf4j
public class SignedWitnessStore implements ThreadedPersistableEnvelope {
@Getter
private Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> map = new ConcurrentHashMap<>();

public class SignedWitnessStore extends SplitStore {
SignedWitnessStore() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

package bisq.core.account.witness;

import bisq.network.p2p.storage.P2PDataStorage;
import bisq.network.p2p.storage.payload.PersistableNetworkPayload;
import bisq.network.p2p.storage.persistence.MapStoreService;
import bisq.network.p2p.storage.persistence.SplitStoreService;

import bisq.common.config.Config;
import bisq.common.storage.Storage;
Expand All @@ -29,14 +28,10 @@

import java.io.File;

import java.util.Map;

import lombok.extern.slf4j.Slf4j;

import static com.google.common.base.Preconditions.checkArgument;

@Slf4j
public class AccountAgeWitnessStorageService extends MapStoreService<AccountAgeWitnessStore, PersistableNetworkPayload> {
public class AccountAgeWitnessStorageService extends SplitStoreService<AccountAgeWitnessStore> {
private static final String FILE_NAME = "AccountAgeWitnessStore";


Expand All @@ -59,11 +54,6 @@ public String getFileName() {
return FILE_NAME;
}

@Override
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap() {
return store.getMap();
}

@Override
public boolean canHandle(PersistableNetworkPayload payload) {
return payload instanceof AccountAgeWitness;
Expand All @@ -78,12 +68,4 @@ public boolean canHandle(PersistableNetworkPayload payload) {
protected AccountAgeWitnessStore createStore() {
return new AccountAgeWitnessStore();
}

@Override
protected void readStore() {
super.readStore();
checkArgument(store instanceof AccountAgeWitnessStore,
"Store is not instance of AccountAgeWitnessStore. That can happen if the ProtoBuffer " +
"file got changed. We cleared the data store and recreated it again.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@
package bisq.core.account.witness;

import bisq.network.p2p.storage.P2PDataStorage;
import bisq.network.p2p.storage.payload.PersistableNetworkPayload;

import bisq.common.proto.persistable.ThreadedPersistableEnvelope;
import bisq.network.p2p.storage.persistence.SplitStore;

import com.google.protobuf.Message;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

import lombok.Getter;
import lombok.extern.slf4j.Slf4j;


Expand All @@ -39,10 +34,7 @@
* definition and provide a hashMap for the domain access.
*/
@Slf4j
public class AccountAgeWitnessStore implements ThreadedPersistableEnvelope {
@Getter
private Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> map = new ConcurrentHashMap<>();

public class AccountAgeWitnessStore extends SplitStore {
AccountAgeWitnessStore() {
}

Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/bisq/core/app/BisqExecutable.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import bisq.core.setup.CoreSetup;
import bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager;
import bisq.core.trade.TradeManager;
import bisq.core.trade.txproof.xmr.XmrTxProofService;

import bisq.network.p2p.P2PService;

Expand Down Expand Up @@ -164,7 +165,6 @@ protected void applyInjector() {

protected void setupDevEnv() {
DevEnv.setDevMode(config.useDevMode);
DevEnv.setDevMode(config.useDevModeHeader);
DevEnv.setDaoActivated(config.daoActivated);
}

Expand Down Expand Up @@ -221,6 +221,7 @@ public void gracefulShutDown(ResultHandler resultHandler) {
try {
injector.getInstance(ArbitratorManager.class).shutDown();
injector.getInstance(TradeManager.class).shutDown();
injector.getInstance(XmrTxProofService.class).shutDown();
injector.getInstance(DaoSetup.class).shutDown();
injector.getInstance(AvoidStandbyModeService.class).shutDown();
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
Expand Down
14 changes: 13 additions & 1 deletion core/src/main/java/bisq/core/app/BisqSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import bisq.core.trade.TradeManager;
import bisq.core.trade.TradeTxException;
import bisq.core.trade.statistics.TradeStatisticsManager;
import bisq.core.trade.txproof.xmr.XmrTxProofService;
import bisq.core.user.Preferences;
import bisq.core.user.User;
import bisq.core.util.FormattingUtils;
Expand Down Expand Up @@ -113,6 +114,7 @@
import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import ch.qos.logback.classic.Level;

Expand Down Expand Up @@ -167,6 +169,7 @@ default void onRequestWalletPassword() {
private final PrivateNotificationManager privateNotificationManager;
private final FilterManager filterManager;
private final TradeStatisticsManager tradeStatisticsManager;
private final XmrTxProofService xmrTxProofService;
private final ClockWatcher clockWatcher;
private final FeeService feeService;
private final DaoSetup daoSetup;
Expand Down Expand Up @@ -263,6 +266,7 @@ public BisqSetup(P2PNetworkSetup p2PNetworkSetup,
PrivateNotificationManager privateNotificationManager,
FilterManager filterManager,
TradeStatisticsManager tradeStatisticsManager,
XmrTxProofService xmrTxProofService,
ClockWatcher clockWatcher,
FeeService feeService,
DaoSetup daoSetup,
Expand Down Expand Up @@ -308,6 +312,7 @@ public BisqSetup(P2PNetworkSetup p2PNetworkSetup,
this.privateNotificationManager = privateNotificationManager;
this.filterManager = filterManager;
this.tradeStatisticsManager = tradeStatisticsManager;
this.xmrTxProofService = xmrTxProofService;
this.clockWatcher = clockWatcher;
this.feeService = feeService;
this.daoSetup = daoSetup;
Expand Down Expand Up @@ -686,6 +691,7 @@ private void initDomainServices() {
traderChatManager.onAllServicesInitialized();

tradeManager.onAllServicesInitialized();
xmrTxProofService.onAllServicesInitialized();

if (walletsSetup.downloadPercentageProperty().get() == 1) {
checkForLockedUpFunds();
Expand Down Expand Up @@ -846,7 +852,13 @@ private void initDomainServices() {
priceAlert.onAllServicesInitialized();
marketAlerts.onAllServicesInitialized();

user.onAllServicesInitialized(revolutAccountsUpdateHandler);
if (revolutAccountsUpdateHandler != null) {
revolutAccountsUpdateHandler.accept(user.getPaymentAccountsAsObservable().stream()
.filter(paymentAccount -> paymentAccount instanceof RevolutAccount)
.map(paymentAccount -> (RevolutAccount) paymentAccount)
.filter(RevolutAccount::userNameNotSet)
.collect(Collectors.toList()));
}

allBasicServicesInitialized = true;
}
Expand Down
Loading