Commit Graph

15576 Commits

Author SHA1 Message Date
Christoph Atteneder
0e1030845a
Simplify warn logging 2021-11-23 09:48:10 +01:00
chimp1984
cb474c57da
Rename getPaymentMethodById to getPaymentMethod 2021-11-23 00:40:59 +01:00
chimp1984
091f82477b
Rename getPaymentMethod to getPaymentMethodId 2021-11-23 00:39:38 +01:00
chimp1984
9569e5a600
Rename getActivePaymentMethodById to getActivePaymentMethod
Rename variables
2021-11-23 00:39:18 +01:00
chimp1984
9d52ddbf96
Add warn log 2021-11-23 00:34:12 +01:00
chimp1984
b6b2d939a1
Only apply maxTradeLimit from PaymentMethod if the PaymentMethod is
found in the active list. Otherwise the 2 BTC default is used.
We get TradeStatistics3 objects from old retired PaymentMethods
which are not found in the active list.
2021-11-22 22:41:32 +01:00
Christoph Atteneder
e50cd42478
Merge pull request #5849 from chimp1984/add-limit-to-tradestats
Add checks for trade statistics
2021-11-21 17:39:30 +01:00
Christoph Atteneder
bc124b3064
Merge pull request #5851 from cbeams/fix-guava
Fix guava dependency issue
2021-11-21 17:37:09 +01:00
Chris Beams
42b00b3a3e
Fix guava dependency issue
Problem: a

    NoSuchMethodError: 'java.util.stream.Collector
    com.google.common.collect.ImmutableMultiset.toImmutableMultiset()'

exception was being thrown when testing the previously-merged upgrade to
Gradle 7.3, as described at keybase://chat/bisq#testing/2466.

Solution: This problem is similar to the issue reported at
jeremylong/DependencyCheck#3221. The source of the problem was multiple
conflicting guava jars on the runtime classpath. This commit upgrades to
guava 30.1.1-jre which ensures a single jar on the classpath.
2021-11-21 17:06:10 +01:00
chimp1984
71e40ce1b7
Add check for trade statistic for max amount and if currency exists in CurrencyUtil 2021-11-20 23:04:25 +01:00
Christoph Atteneder
b5a43c7f95
Merge pull request #5840 from chimp1984/add-i2p-to-btc-core-networktypes
Add I2P as enum entry
2021-11-18 18:34:17 +01:00
chimp1984
e442283db4
Add I2P as enum entry 2021-11-18 18:00:06 +01:00
Christoph Atteneder
ef7ce109ac
Merge pull request #5834 from jmacxx/dispute_ui_add_penalty
Add penalty calculation to dispute agent UI
2021-11-18 17:57:54 +01:00
Bisq GitHub Admin
e52a821f34
Merge pull request #5838 from ripcurlx/fix-broken-test
Fix broken test for new build
2021-11-18 17:55:51 +01:00
Christoph Atteneder
c64e6f3298
Fix broken test for new build 2021-11-18 17:11:17 +01:00
jmacxx
5c00e1974e
Add penalty calc to dispute UI 2021-11-18 08:43:06 -06:00
Christoph Atteneder
4b6b1cdf11
Merge pull request #5839 from cbeams/add-jackson-pom-checksum
Add missing metadata for jackson-base pom 2.12.1
2021-11-18 15:03:47 +01:00
Chris Beams
ea629de1a1
Add missing metadata for jackson-base pom 2.12.1
Problem: When merging #5824, the absence of this entry caused a build
failure at dependency verification time against JDK11 and JDK15 on
Ubuntu-latest [1]. It may also cause failures on other JDK/OS
combinations, but the GitHub workflow was aborted before those failures
couldhave occurred. In any case, this omission did not create build
failures on any of the local development machines that tested the
aforementioned PR. Reasons for this discrepancy are unknown.

Solution: manually fetch the pom from [2], run `sha256sum` on it locally
and commit the result to the verification metadata file.

[1]: https://github.com/bisq-network/bisq/runs/4249640611?check_suite_focus=true#step:6:33
[2]: https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-base/2.11.1/jackson-base-2.11.1.pom
2021-11-18 12:38:01 +01:00
Christoph Atteneder
c05e7a09c0
Merge pull request #5824 from cbeams/gradle-7.3
Upgrade to Gradle 7.3
2021-11-18 09:32:04 +01:00
Christoph Atteneder
a27ac4313b
Merge pull request #5826 from chimp1984/improve-fee-handling
Improve fee handling
2021-11-18 09:23:15 +01:00
Christoph Atteneder
90ea4fc14a
Merge pull request #5813 from jmacxx/fix_locked_funds_display
Fix calculation & display of Locked Funds
2021-11-16 09:35:06 +01:00
Christoph Atteneder
7faaa9d5ba
Merge pull request #5831 from jmacxx/fix_display_failed_trade_tab
Fix display of missing Failed Trade tab
2021-11-16 09:31:10 +01:00
jmacxx
daee63490e
Fix display of missing failed trade tab 2021-11-15 11:10:16 -06:00
Chris Beams
cb7b0e8da4
Set pricenode mainClassName explicitly
Problem: after the upgrade from 6.6.1 to 7.3, the usual invocation of,
e.g. `./bisq-pricenode 2 2` started failing as reported by @emzy at [1].

    bisq@ubuntu-4gb-fsn1-1:~$ /bisq/bisq/bisq-pricenode 2
    Error: Could not find or load main class 2
    Caused by: java.lang.ClassNotFoundException: 2

Solution: for unknown reasons, the bisq-pricenode script worked as
expected under 6.6.1, i.e. contained the fq main class name in its
scripted invocation of `java -jar ...`, but under 7.3, this main class
name was missing. Through trial and error, it turns out that setting
`mainClassName` explicitly in the :pricenode subproject configuration
solves this problem and makes the start script work as expected.
Presumably, this problem arose in conjunction with the major version
upgrade of the spring boot Gradle plugin that was necessary when
upgrading to Gradle 7.3, but this has not been verified.

[1]: https://github.com/bisq-network/bisq/pull/5824#issuecomment-968276686
2021-11-15 13:44:44 +01:00
Christoph Atteneder
0ea056c6d2
Add Windows artifact hashes 2021-11-15 13:26:05 +01:00
chimp1984
f17c2e1234
Rename method 2021-11-15 13:05:40 +01:00
Chris Beams
280c2aaa8e
Adapt Gradle startScript customization logic
Problem: ClassNotFoundError was getting thrown when attempting to run,
e.g. the `./bisq-desktop` or `./bisq-pricenode` start scripts.

Solution: Gradle's posix start scripts were changed significantly
between 6.6.1 and 7.3, including a change to the way the current
directory is determined. This change updates the way we customize start
script generation to allow running them from the root of the repo. This
change only affects the unix / posix variants. The Windows .bat files do
not need to be adapted similarly.
2021-11-15 13:03:49 +01:00
Christoph Atteneder
83c9355931
Merge pull request #5825 from chimp1984/improve-offer-validation
Improve offer validation
2021-11-15 12:03:29 +01:00
chimp1984
b00d317e88
Rename getFeeHistorical to calculateFee 2021-11-14 15:07:34 +01:00
chimp1984
5928b44843
Use genesis height in maybeTestFeeFromFilter instead of 0 2021-11-14 15:07:34 +01:00
chimp1984
2e137459dc
Add check for fee from filter
That check is done if:
- If we are after activation time
- If filter is available
- If value in filter is > 0

The check compares the paid fee and the fee value from filter
and requires that paid fee is > 70% of filter value.
See comments in code for more background.
2021-11-14 15:07:34 +01:00
chimp1984
1027b9d7fe
Extract vars
Cleanups
2021-11-14 15:07:33 +01:00
chimp1984
c88addef16
Break up if else clauses (helps for improvements
in later commits)
2021-11-14 15:07:33 +01:00
chimp1984
b427795e4c
Extract minFeeParam
Cleanup
2021-11-14 15:07:33 +01:00
chimp1984
e57c682001
Add blockHeightAtOfferCreation to TxValidator
Used in case of maker fee validation
2021-11-14 15:07:33 +01:00
chimp1984
65285e2c69
Add filterManager to filterManager (will
be used in follow-up commits)
2021-11-14 15:07:33 +01:00
chimp1984
a082fd4a84
Add fee fields to filter 2021-11-14 15:07:32 +01:00
chimp1984
478b7568ee
Add return
Add more info in case it fails
2021-11-14 11:28:25 +01:00
chimp1984
f054c8ae95
Rename 2021-11-14 02:00:54 +01:00
chimp1984
65d3ef4ff5
Add check for isUseMarketBasedPrice 2021-11-14 02:00:00 +01:00
Chris Beams
d964ded2af
Add missing verification metadata
These entries showed up as missing when @jmacxx ran this PR branch on
his local Linux machine under JDK 11. It is not clear why these
dependencies were required there and not elsewhere, e.g. under CI or on
my own Mac.
2021-11-13 15:28:43 +01:00
Chris Beams
5e93cfea47
Add missing dependency verification entries
This fixes the CI build failure at
https://github.com/bisq-network/bisq/runs/4198811212?check_suite_focus=true#step:6:306
by adding missing entries for findbugs, jsr305 and various netty
artifacts. It is not clear why these artifacts were required under linux
and not under MacOS.
2021-11-13 14:56:49 +01:00
Chris Beams
1460914757
Organize dependency entries
As mentioned in a prior commit, the upgrade to Gradle 7.x results in
many more dependency declarations in the file, many of which are
effectively duplicates. This change does not attempt to eliminate those
duplications in any clever way, but rather just tidies up and organizes
all dependency declarations by sorting them alphabetically.
2021-11-13 14:45:14 +01:00
Chris Beams
d7129a2d19
Disable verification for javadoc and source jars
Prior to this commit, IDEA would fail to build the project because it
downloads javadoc and source jars that do not have entries in the
verification file. These artifacts are now trusted by default as
documented at https://docs.gradle.org/current/userguide/dependency_verification.html#sec:skipping-javadocs
2021-11-13 14:43:03 +01:00
Chris Beams
e09d56b696
Upgrade Mockito to 4.0.0
This fixes the 'Unsupported class file major version 60' problem
documented at mockito/mockito#2065 to allow building Bisq on JDK 16+.
2021-11-13 13:53:38 +01:00
Chris Beams
990365d5b9
Upgrade Lombok to support JDK16+
This fixes the IllegalAccessError problem documented at
https://stackoverflow.com/a/66981165/622403
2021-11-13 13:43:00 +01:00
Chris Beams
3557fe9844
Add verification metadata for MacOS x86 artifacts
This commit updates the verification-metadata.xml file to include
osx-x86_64 variants of protoc dependencies.
2021-11-13 13:33:26 +01:00
Chris Beams
695fe39cf7
Add verification metadata for linux-specific artifacts
CI build failed after the previous commit because the new dependency
verification file was generated on a Mac and therefore did not include
linux-specification artifact variants. This same process will need to
be done under Windows as well.
2021-11-13 13:26:03 +01:00
Chris Beams
6f8197b419
Migrate to Gradle's built-in dependency verification
This commit removes the use of our fork of the gradle-witness plugin in
favor of Gradle's relatively new built-in dependency verification
feature [1].

The gradle/verification-metadata.xml file was produced using the
following command:

    ./gradlew --write-verification-metadata sha256 build

Where `build` is the usual `gradle build` command. All dependency
configurations are resolved this way, and written out to the file.

The resulting file contains 273 unique dependency declarations, as
compared to just 64 in our now-removed gradle-witness.gradle file. This
means that the coverage of dependencies verified is much more complete.

The new file contains the same sha256 checksums for each dependency as
the old file. This was manually spot-checked for a significant number of
the dependencies.

Like with gradle-witness, builds will break when dependencies are
upgraded (and now also when they are added). To fix these breakages, the
`--write-verification-metadata sha256` option must be provided to the
build. Note that new entries will be added for upgraded depedencies, but
old entries are not removed automatically from the file. These must be
removed manually.

[1]: https://docs.gradle.org/current/userguide/dependency_verification.html
2021-11-13 12:59:52 +01:00
Chris Beams
6a3d2642da
Upgrade to Gradle 7.3
This commit does what is necessary to upgrade from Gradle 6.6.1 to
7.3, including:

- generating the new Gradle wrapper
- replacing uses of 'compile' with 'implementation'
- replacing uses of 'testCompile' with 'testImplementation'

Moving from *compile to *implementation results in many more duplicated
dependency declarations throughout the file. These will be tidied up in
a subsequent commit.

Several dependencies needed to be upgraded in order to support this
change. One of them was Spring Boot, from 1.5.1 to 2.5.6. This is a
major upgrade that contained some breaking changes to the Spring Boot
Actuator. These changes required the removal of the pricenode's
/getVersion endpoint.

The Gradle Witness plugin has been disabled in this commit, because it
uses the now-removed 'compile' configuration. Use of the Witness plugin
will be removed entirely in a subsequent commit in favor of using
Gradle's new built-in dependency verification feature.
2021-11-13 12:09:22 +01:00