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

Release/v1.1.6 #3280

Merged
merged 54 commits into from
Sep 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7be5cab
More UI polish for Dark Mode
wiz Sep 3, 2019
bf69f51
Reduce size of chart axis font to fit Japanese string
wiz Sep 3, 2019
ec633f0
Fix CSS styling bug caused by using Text() instead of Label()
wiz Sep 2, 2019
aae4977
Don't paint vertical grid lines on charts
wiz Sep 3, 2019
9af723f
Remove not used fields
chimp1984 Sep 6, 2019
5d4f9af
Add 90 days average and median BSQ price
chimp1984 Sep 6, 2019
93e6d86
Remove CapabilityRequiringPayload from AckMessage
chimp1984 Sep 6, 2019
206c4bc
Remove CapabilityRequiringPayload from AccountAgeWitness
chimp1984 Sep 6, 2019
7856722
Remove CapabilityRequiringPayload from TradeStatistics2
chimp1984 Sep 6, 2019
9be4b71
Add comments
chimp1984 Sep 6, 2019
3df57ad
Add Deprecated annotation to old Capabilities
chimp1984 Sep 6, 2019
0a263b0
Merge pull request #3215 from chimp1984/remove-old-capability-require…
sqrrm Sep 6, 2019
e5e49dc
Don't build debug strings when debug is not enabled.
christophsturm Sep 6, 2019
3666ed2
Don't build debug strings when debug is not enabled.
christophsturm Sep 6, 2019
372ff50
Implement reviewer suggestions also in NetworkNode
christophsturm Sep 6, 2019
69d70f3
Revert non-changes
freimair Sep 6, 2019
7c034a4
Merge pull request #3212 from chimp1984/add-average-bsq-price
ripcurlx Sep 6, 2019
4d49697
Only build string when its actually output
christophsturm Sep 6, 2019
5fbe2e3
Fix broken build because of removed Hex util in release branch
ripcurlx Sep 6, 2019
fee097d
Add CapabilityRequiringPayload interface to BundleOfEnvelopes
chimp1984 Sep 7, 2019
b210118
Set old DAO Capabilities Deprecated
chimp1984 Sep 7, 2019
622cf8b
Merge pull request #3222 from chimp1984/remove-old-dao-required-capab…
ripcurlx Sep 9, 2019
bb806cf
Add bsq price trend indicator (#3226)
chimp1984 Sep 9, 2019
d55114e
Add mediation support (#3221)
chimp1984 Sep 9, 2019
617ae35
Fix wrong error string
chimp1984 Sep 11, 2019
5e48845
Remove dev log, change log level
chimp1984 Sep 11, 2019
4a3d070
Close trader chat popup once trade gets closed
chimp1984 Sep 11, 2019
2387651
Merge pull request #3245 from chimp1984/bug-fixes-for-rc-1.1.6
ripcurlx Sep 11, 2019
6b69579
Add missing CSS classes for trade message states and status icon
wiz Sep 11, 2019
0c4a07e
Tweak light/dark theme CSS colors for trade chat state messages
wiz Sep 11, 2019
3b35386
Add support for Monero integrated addresses; fix #3242
battleofwizards Sep 11, 2019
e71b6d6
Remove CapabilityRequiringPayload from NewBlockBroadcastMessage
chimp1984 Sep 12, 2019
e84fffb
Merge pull request #3250 from chimp1984/remove-required-capability
ripcurlx Sep 13, 2019
4d2a51e
Add new FormBuilder method for Label + TextField + AutocompleteComboBox
wiz Sep 12, 2019
a09557f
Add new payment method: Japan Bank Transfer (furikomi)
wiz Sep 7, 2019
8f20096
Fix typo fist > first
ripcurlx Sep 13, 2019
84d9158
Hide support request info, when trade is complete
ripcurlx Sep 13, 2019
982f610
Add alternative text until mediation is activated
ripcurlx Sep 13, 2019
15f71c9
Add information what to do next after mediation is completed
ripcurlx Sep 13, 2019
bd656d5
Rename review and accept or reject button to prevent confusion
ripcurlx Sep 13, 2019
f28d262
Update data stores
ripcurlx Sep 13, 2019
ac98a61
Update migration dates for v1.1.6 and remove testing code
ripcurlx Sep 13, 2019
690ceb0
Fix typo
ripcurlx Sep 13, 2019
12809a3
Merge pull request #3254 from ripcurlx/improve-mediation-ui
ripcurlx Sep 13, 2019
457da44
Bump version number
ripcurlx Sep 13, 2019
e617999
Merge pull request #3255 from ripcurlx/update-data-stores-and-dates-f…
sqrrm Sep 13, 2019
9f84f02
Remove CapabilityRequiringPayload from GetBlocksRequest
chimp1984 Sep 14, 2019
0ada9a3
Merge pull request #3259 from chimp1984/remove-CapabilityRequiringPay…
ripcurlx Sep 14, 2019
4cc636d
Fix various bugs related to Japan Bank Transfer payment method (#3258)
wiz Sep 14, 2019
2782ae0
Remove extra field from JapanBankTransferForm::addFormForBuyer()
wiz Sep 14, 2019
8327d35
Remove bitcoin4-fullnode.csg.uzh.ch / 192.41.136.217 btcnode
wiz Sep 15, 2019
db62d0d
Update IP address for @mrosseel's 2 hard-coded BTC nodes
wiz Sep 15, 2019
c0563fb
Revert to SNAPSHOT version
ripcurlx Sep 16, 2019
cc3128d
Merge branch 'master' of github.com:bisq-network/bisq into release/v1…
ripcurlx Sep 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ configure(project(':desktop')) {
apply plugin: 'witness'
apply from: '../gradle/witness/gradle-witness.gradle'

version = '1.1.5-SNAPSHOT'
version = '1.1.6-SNAPSHOT'

mainClassName = 'bisq.desktop.app.BisqAppMain'

Expand Down
50 changes: 48 additions & 2 deletions common/src/main/java/bisq/common/app/Capabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@

package bisq.common.app;

import com.google.common.base.Joiner;

import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;

Expand All @@ -43,7 +47,7 @@ public class Capabilities {

// Defines which most recent capability any node need to support.
// This helps to clean network from very old inactive but still running nodes.
private static final Capability mandatoryCapability = Capability.DAO_STATE;
private static final Capability MANDATORY_CAPABILITY = Capability.DAO_STATE;

protected final Set<Capability> capabilities = new HashSet<>();

Expand Down Expand Up @@ -101,7 +105,7 @@ public boolean isEmpty() {
* @return int list of Capability ordinals
*/
public static List<Integer> toIntList(Capabilities capabilities) {
return capabilities.capabilities.stream().map(capability -> capability.ordinal()).sorted().collect(Collectors.toList());
return capabilities.capabilities.stream().map(Enum::ordinal).sorted().collect(Collectors.toList());
}

/**
Expand All @@ -113,11 +117,46 @@ public static List<Integer> toIntList(Capabilities capabilities) {
public static Capabilities fromIntList(List<Integer> capabilities) {
return new Capabilities(capabilities.stream()
.filter(integer -> integer < Capability.values().length)
.filter(integer -> integer >= 0)
.map(integer -> Capability.values()[integer])
.collect(Collectors.toSet()));
}

/**
*
* @param list Comma separated list of Capability ordinals.
* @return Capabilities
*/
public static Capabilities fromStringList(String list) {
if (list == null || list.isEmpty())
return new Capabilities();

List<String> entries = List.of(list.replace(" ", "").split(","));
List<Integer> capabilitiesList = entries.stream()
.map(c -> {
try {
return Integer.parseInt(c);
} catch (Throwable e) {
return null;
}
})
.filter(Objects::nonNull)
.collect(Collectors.toList());
return Capabilities.fromIntList(capabilitiesList);
}

/**
* @return Converts capabilities to list of ordinals as comma separated strings
*/
public String toStringList() {
return Joiner.on(", ").join(Capabilities.toIntList(this));
}

public static boolean hasMandatoryCapability(Capabilities capabilities) {
return hasMandatoryCapability(capabilities, MANDATORY_CAPABILITY);
}

public static boolean hasMandatoryCapability(Capabilities capabilities, Capability mandatoryCapability) {
return capabilities.capabilities.stream().anyMatch(c -> c == mandatoryCapability);
}

Expand All @@ -126,6 +165,13 @@ public String toString() {
return Arrays.toString(Capabilities.toIntList(this).toArray());
}

public String prettyPrint() {
return capabilities.stream()
.sorted(Comparator.comparingInt(Enum::ordinal))
.map(e -> e.name() + " [" + e.ordinal() + "]")
.collect(Collectors.joining(", "));
}

public int size() {
return capabilities.size();
}
Expand Down
31 changes: 18 additions & 13 deletions common/src/main/java/bisq/common/app/Capability.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,24 @@
// We can define here special features the client is supporting.
// Useful for updates to new versions where a new data type would break backwards compatibility or to
// limit a node to certain behaviour and roles like the seed nodes.
// We don't use the Enum in any serialized data, as changes in the enum would break backwards compatibility. We use the ordinal integer instead.
// We don't use the Enum in any serialized data, as changes in the enum would break backwards compatibility.
// We use the ordinal integer instead.
// Sequence in the enum must not be changed (append only).
public enum Capability {
TRADE_STATISTICS,
TRADE_STATISTICS_2,
ACCOUNT_AGE_WITNESS,
SEED_NODE,
DAO_FULL_NODE,
PROPOSAL,
BLIND_VOTE,
ACK_MSG,
RECEIVE_BSQ_BLOCK,
DAO_STATE,
BUNDLE_OF_ENVELOPES,
SIGNED_ACCOUNT_AGE_WITNESS
@Deprecated TRADE_STATISTICS, // Not required anymore as no old clients out there not having that support
@Deprecated TRADE_STATISTICS_2, // Not required anymore as no old clients out there not having that support
@Deprecated ACCOUNT_AGE_WITNESS, // Not required anymore as no old clients out there not having that support
SEED_NODE, // Node is a seed node
DAO_FULL_NODE, // DAO full node can deliver BSQ blocks
@Deprecated PROPOSAL, // Not required anymore as no old clients out there not having that support
@Deprecated BLIND_VOTE, // Not required anymore as no old clients out there not having that support
@Deprecated ACK_MSG, // Not required anymore as no old clients out there not having that support
RECEIVE_BSQ_BLOCK, // Signaling that node which wants to receive BSQ blocks (DAO lite node)
@Deprecated DAO_STATE, // Not required anymore as no old clients out there not having that support

//TODO can be set deprecated after v1.1.6 as we enforce update there
BUNDLE_OF_ENVELOPES, // Supports bundling of messages if many messages are sent in short interval

SIGNED_ACCOUNT_AGE_WITNESS, // Supports the signed account age witness feature
MEDIATION // Supports mediation feature
}
1 change: 0 additions & 1 deletion common/src/main/java/bisq/common/app/DevEnv.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static void setup(Injector injector) {

// If set to true we ignore several UI behavior like confirmation popups as well dummy accounts are created and
// offers are filled with default values. Intended to make dev testing faster.
@SuppressWarnings("PointlessBooleanExpression")
private static boolean devMode = false;

public static boolean isDevMode() {
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/bisq/common/app/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ 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.1.5";
public static final String VERSION = "1.1.6";

public static int getMajorVersion(String version) {
return getSubVersion(version, 0);
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/bisq/common/taskrunner/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public Task(TaskRunner taskHandler, T model) {
this.model = model;
}

abstract protected void run();
protected abstract void run();

protected void runInterceptHook() {
if (getClass() == taskToIntercept)
Expand Down
15 changes: 15 additions & 0 deletions common/src/main/java/bisq/common/util/MathUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,19 @@ public static double scaleDownByPowerOf10(long value, int exponent) {
public static double exactMultiply(double value1, double value2) {
return BigDecimal.valueOf(value1).multiply(BigDecimal.valueOf(value2)).doubleValue();
}

public static long getMedian(Long[] list) {
if (list.length == 0) {
return 0L;
}

int middle = list.length / 2;
long median;
if (list.length % 2 == 1) {
median = list[middle];
} else {
median = MathUtils.roundDoubleToLong((list[middle - 1] + list[middle]) / 2.0);
}
return median;
}
}
Loading