Commit Graph

10658 Commits

Author SHA1 Message Date
Dominykas Mostauskis
f895da416f
Add local Bitcoin node configuration detection
Refactors LocalBitcoinNode and adds detection for local Bitcoin node's
configuration, namely, whether it is pruning and whether it has bloom
filter queries enabled.

The local node's configuration (and its presence) is retrieved by
performing a Bitcoin protocol handshake, which includes the local
Bitcoin node sending us its version message (VersionMessage in
BitcoinJ), which contains the information we're interested in.

Due to some quirky BitcoinJ logic, sometimes the handshake is
interrupted, even though we have received the local node's version
message. That contributes to the handshake handling in LocalBitcoinNode
being a bit complicated.

Refactoring consists of two principle changes: the public interface is
split into methods that trigger checks and methods that retrieve the
cached results. The methods that trigger checks have names starting
with "check", and methods that retrieve the cached results have names
that start with "is".

The other major refactor is the use of Optional<Boolean> instead of
boolean for storing and returning the results, an empty Optional
signifying that the relevant check was not yet performed. Switching to
Optionals has caused other code that queries LocalBitcoinNode to throw
an exception in case the query is made before the checks are. Before,
the results were instantiated to "false" and that would be returned
in case the query was made before the checks completed. This change has
revealed one occasion (Preferences class) where this happens.
2020-02-18 00:34:58 +02:00
sqrrm
a3f4f7cfab
Merge pull request #3974 from ripcurlx/exclude-feature-issues-of-becoming-stale
Exclude issues labeled `a:feature` of becoming stale
2020-02-17 18:02:50 +01:00
Christoph Atteneder
0facdc9b71
Merge pull request #3956 from stejbac/speed-up-supply-view-load
Speed up BSQ supply view load
2020-02-17 14:14:20 +01:00
sqrrm
665fed3b40
Merge pull request #3971 from bisq-network/release/v1.2.7
Release/v1.2.7
2020-02-17 13:05:03 +01:00
sqrrm
23c2052fe6
Merge pull request #3970 from bisq-network/release/v1.2.6
Release/v1.2.6
2020-02-17 13:04:32 +01:00
Christoph Atteneder
15e365e397
Exclude issues labeled a:feature of becoming stale 2020-02-17 10:43:05 +01:00
Christoph Atteneder
0083343178
Merge pull request #3951 from wiz/dont-fail-if-seednode-homedir-exists
Use `mkdir -p` in seednode installer when creating bitcoin/bisq homedirs
2020-02-17 10:17:59 +01:00
Christoph Atteneder
b1f8b3e144
Merge pull request #3950 from wiz/set-syslog-tag-systemd-service
Set syslog identifier as "bisq" in systemd service config
2020-02-17 10:17:25 +01:00
Christoph Atteneder
971c334aee
Merge pull request #3968 from m52go/video-to-text
Change video link in greeting to blog link
2020-02-17 10:16:32 +01:00
Christoph Atteneder
e931d06274
Revert to SNAPSHOT version 2020-02-14 13:02:52 +01:00
Christoph Atteneder
1cb7b0521d
Bump version number 2020-02-13 20:19:52 +01:00
Christoph Atteneder
1163b25031
Revert https://github.com/bisq-network/bisq/pull/3883
Fixes issue #3969

This setting prevented the startup of the app on macOS Mojave.
Possibly on some other older macOS versions as well.
2020-02-13 20:19:22 +01:00
Steve Jain
14d2e0c8ae
Change video link in greeting to blog link
In case link to text post is preferred. The post has the video embedded in it.
2020-02-12 16:38:42 -05:00
Christoph Atteneder
89e938ecad
Merge pull request #3967 from cbeams/relax-config-file-parsing
Allow unrecognized options in config file
2020-02-12 18:34:44 +01:00
Chris Beams
7f9c935a8b
Allow unrecognized options in config file
Prior to this commit, Bisq's new `Config` infrastructure would throw an
exception on encountering an unrecognized option in the
`bisq.properties` config file and the Bisq application would handle this
by reporting an error at the command line indicating that the given
option was not recognized.

For example, given a bisq.properties file that reads as follows:

    $ cat $APP_DATA_DIR/bisq.properties
    bogus=42

running Bisq would exit with the following error message:

    $ java -jar bisq.jar
    error: problem parsing option 'bogus': bogus is not a recognized option.

This was reasonable enough behavior, but it had two problems. The first
is that the error message did not indicate to the user that the
unrecognized option was found in the config file as opposed to the
command line. Users unfamiliar with the config file might not know to
look there to eliminate or fix the offending option. The second problem
surfaced when testing the Windows executable build for the v1.2.6
release. When such an error was encountered, the executable would just
fail silently, reporting nothing to the user.

Both of these problems should be addressed on their own, i.e. option
parsing errors should report to the user whether the offending option
was at the command line or in the config file, and our packaged
executables should never just fail silently if we can avoid it.

However, this change does not address either of these problems directly.
It rather avoids the problems completely by relaxing config file
parsing to silently allow unrecognized options. This behavior mimics
prior (pre-`Config`) Bisq versions, and it also follows suit with
Bitcoin Core's own config file processing.

This fixes #3966, which surfaced this problem. In that particular issue,
an option line had somehow been added to the user's bisq.properties
config file that consisted of an option key containing 452 octal null
characters (\u0000) followed by an equals sign and an empty option
value. It is unknown how this bogus option was ever added to the user's
config file in the first place, but on the chance that previous Bisq
versions somehow added this, the changes in this commit ensure that such
entries will not cause affected users' Bisq applications to silently
fail in versions 1.2.6 and beyond.
2020-02-12 18:30:23 +01:00
Chris Beams
651515d6a0
Allow unrecognized options in config file
Prior to this commit, Bisq's new `Config` infrastructure would throw an
exception on encountering an unrecognized option in the
`bisq.properties` config file and the Bisq application would handle this
by reporting an error at the command line indicating that the given
option was not recognized.

For example, given a bisq.properties file that reads as follows:

    $ cat $APP_DATA_DIR/bisq.properties
    bogus=42

running Bisq would exit with the following error message:

    $ java -jar bisq.jar
    error: problem parsing option 'bogus': bogus is not a recognized option.

This was reasonable enough behavior, but it had two problems. The first
is that the error message did not indicate to the user that the
unrecognized option was found in the config file as opposed to the
command line. Users unfamiliar with the config file might not know to
look there to eliminate or fix the offending option. The second problem
surfaced when testing the Windows executable build for the v1.2.6
release. When such an error was encountered, the executable would just
fail silently, reporting nothing to the user.

Both of these problems should be addressed on their own, i.e. option
parsing errors should report to the user whether the offending option
was at the command line or in the config file, and our packaged
executables should never just fail silently if we can avoid it.

However, this change does not address either of these problems directly.
It rather avoids the problems completely by relaxing config file
parsing to silently allow unrecognized options. This behavior mimics
prior (pre-`Config`) Bisq versions, and it also follows suit with
Bitcoin Core's own config file processing.

This fixes #3966, which surfaced this problem. In that particular issue,
an option line had somehow been added to the user's bisq.properties
config file that consisted of an option key containing 452 octal null
characters (\u0000) followed by an equals sign and an empty option
value. It is unknown how this bogus option was ever added to the user's
config file in the first place, but on the chance that previous Bisq
versions somehow added this, the changes in this commit ensure that such
entries will not cause affected users' Bisq applications to silently
fail in versions 1.2.6 and beyond.
2020-02-12 18:22:26 +01:00
Christoph Atteneder
f53a41ee7a
Allow NullpointerException to be thrown for invalid offers
It is handled properly and will remove offers from being exported
2020-02-12 18:05:28 +01:00
Christoph Atteneder
e9dd7d6fed
Update data stores 2020-02-12 09:34:27 +01:00
Christoph Atteneder
33ce412548
Update bitcoinJ checkpoints file 2020-02-12 09:34:20 +01:00
sqrrm
580681e695
Merge pull request #3965 from ripcurlx/update-data-stores
Update bitcoinJ checkpoints and data stores
2020-02-12 09:31:30 +01:00
Christoph Atteneder
b00d73ff7c
Add test for Liquid Bitcoin and improve error handling 2020-02-11 17:31:43 +01:00
Christoph Atteneder
4cb973d9d0
Fix wrong executable path for Windows signing 2020-02-11 16:19:15 +01:00
Christoph Atteneder
132d4c486f
Update data stores 2020-02-11 13:49:54 +01:00
wiz
b50543e113
Fix btcnode validation regex to handle multiple FQDNs, add tests
Please enter the commit message for your changes. Lines starting
2020-02-11 13:45:18 +01:00
Devin Bileck
580dd14155
Fix address regex
The original implementation of #3895 did not validate IPv6 nor FQDN
addresses.
2020-02-11 13:44:55 +01:00
Christoph Atteneder
64e4438702
Merge pull request #3964 from wiz/fix-devin-btcnode-regex
Fix btcnode validation regex to handle multiple FQDNs, add tests
2020-02-11 13:41:24 +01:00
wiz
7f92d12cc9
Fix btcnode validation regex to handle multiple FQDNs, add tests
Please enter the commit message for your changes. Lines starting
2020-02-11 21:12:12 +09:00
Christoph Atteneder
7f93ce7e31
Remove empty line
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2020-02-11 12:22:58 +01:00
Christoph Atteneder
4f9d0fa36c
Remove duplicates when delivered from storage 2020-02-11 12:22:36 +01:00
Christoph Atteneder
2e5184f50d
Revert setting of deposit tx id to null 2020-02-11 12:22:28 +01:00
Christoph Atteneder
777052fd2f
Merge pull request #3961 from devinbileck/fix-address-regex
Fix address regex
2020-02-11 12:07:53 +01:00
Christoph Atteneder
0157ed137e
Update bitcoinJ checkpoints file 2020-02-11 11:59:28 +01:00
Devin Bileck
0f71ebb2a5
Fix address regex
The original implementation of #3895 did not validate IPv6 nor FQDN
addresses.
2020-02-11 11:39:06 +01:00
wiz
22e8c242dc
Add 2 new btcnodes operated by @wiz
* m3yqzythryowgedc.onion:8333
* zyhtr2ffbzn5yeg3.onion:8333
2020-02-11 11:34:44 +01:00
Christoph Atteneder
bb0c14dae4
Merge pull request #3954 from wiz/add-moar-wiz-btcnodes
Add 2 new btcnodes operated by @wiz
2020-02-11 11:34:27 +01:00
Christoph Atteneder
fe1aa465cb
Update translations 2020-02-11 11:14:14 +01:00
Steven Barclay
3cfb583e8a
Fix incorrect rounding of BSQ dollar price to whole number
Add a new method to DisplayUtils to restore the old rounding behaviour
of formatVolumeWithCode whenever a fractional volume is required. This
fixes a regression caused by #3926 to remove unnecessarily displayed
decimals for fiat volumes - it appears that in every case but the avg.
dollar price on the BSQ dashboard a whole number should be shown.

Also add a relevant test.
2020-02-11 10:50:35 +01:00
Steven Barclay
6d39bc0894
Do some minor cleanup of DisplayUtils 2020-02-11 10:50:25 +01:00
Christoph Atteneder
f400298a55
Merge pull request #3953 from stejbac/fix-bsq-avg-dollar-price
Fix incorrect rounding of BSQ dollar price to whole number
2020-02-11 10:49:39 +01:00
Devin Bileck
d166e08d43
Resolve test failures on windows (#3960)
* Close stream writer prior to deleting temp file

On Windows, instantiating the stream writer appears to lock the file,
preventing the file from being deleted. This was causing the assertion
that the file is deleted to fail.

* Use proper file path on Windows

On Windows, the exception message contained backwards slashes causing
the test to fail.

* Resolve codacy issues
2020-02-11 10:35:22 +01:00
sqrrm
923487ed22
Merge pull request #3958 from ripcurlx/revert-setting-deposittxid-null
Revert setting of null to deposit tx id
2020-02-10 18:43:01 +01:00
Christoph Atteneder
f516da6810
Remove empty line
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2020-02-10 13:49:54 +01:00
Christoph Atteneder
447c7e8fa4
Remove duplicates when delivered from storage 2020-02-10 13:15:56 +01:00
Christoph Atteneder
834e00fbb9
Revert setting of deposit tx id to null 2020-02-10 13:15:12 +01:00
Steven Barclay
459f0db661
Memoise block times to speed up display of BSQ issued graph
Avoid repeatedly calling DaoFacade.getBlockTime for Issuance objects
with the same chain height, as that method linearly scans the entire
linked list of DaoState blocks, making it quite slow. Instead, memoise
the mapping from chain height to block-time month, so that it is only
computed once per graph point instead of once for every BSQ issuance.
2020-02-10 04:46:59 +00:00
Steven Barclay
97b9f733ab
Do some minor tidying of DAO SupplyView
* Use Java Time instead of java.sql.Date for local date calculations;
* Avoid raw types & unsafe varargs warnings;
* Fix false compiler error in IDEA due to discrepancy with javac;
* Formatting & method visibility.
2020-02-09 21:54:09 +00:00
wiz
bb920319ff
Add 2 new btcnodes operated by @wiz
* m3yqzythryowgedc.onion:8333
* zyhtr2ffbzn5yeg3.onion:8333
2020-02-09 17:27:22 +09:00
Steven Barclay
c2b519a04a
Fix incorrect rounding of BSQ dollar price to whole number
Add a new method to DisplayUtils to restore the old rounding behaviour
of formatVolumeWithCode whenever a fractional volume is required. This
fixes a regression caused by #3926 to remove unnecessarily displayed
decimals for fiat volumes - it appears that in every case but the avg.
dollar price on the BSQ dashboard a whole number should be shown.

Also add a relevant test.
2020-02-08 23:15:45 +00:00
Steven Barclay
2e78dc6f4c
Do some minor cleanup of DisplayUtils 2020-02-08 22:44:19 +00:00
wiz
9589f8c7af
Use mkdir -p in seednode installer when creating bitcoin/bisq homedirs 2020-02-09 04:01:57 +09:00