This change forces :relay's grpc-auth version to match the
version of all other io.grpc-* dependencies, and gets rid of
the duplcate gson dependency v2.8.2
This commit fixes#4103, where it was demonstrated that a
bisq.properties file containing the following entries would cause Bisq
to fail at startup:
baseCurrencyNetwork=BTC_MAINNET
bannedSeedNodes=
bannedBtcNodes=
bannedPriceRelayNodes=5bmpx76qllutpcyp
The source of the problem was that the jOptSimple argument parsing
library converts the empty value of bannedSeedNodes to a List<String> of
size 1 where the 0th element of the list is an empty string. This empty
string was then attempted to be converted into a new NodeAddress,
causing a validation error. This conversion happened during Guice
wiring, and manifested as a blank white screen appearing as wiring
errors often do in Bisq.
The fix is simple and surgical. We now filter out any empty string
elements before attempting to convert the banned seed node value to a
new node address. I have reviewed the other related options, such as
bannedPriceRelayNodes and bannedBtcNodes, and they do not cause the
problem described above, so no filtering or other changes have been made
to the way they work.
Change member name OptionParser cmdParser -> parser.
Change server listening port to 9998, client port to 9998.
Change constructor argument from String[] param -> args.
Print the result only, w/out exec time.
Handle help command & print that to stdout; print help
triggered by user error to stderr.
Use explicit system SUCCESS/FAIL codes in System.exit(0 || 1).
Remove an unnecessary PersistableEnvelope interface by making them
standalone @Value classes with private List fields, instead of extending
PersistableList. As they weren't using any functionality of the latter
other than the getList() and stream() methods, this should not alter
behaviour, outside MeritList::toString.
Also comment out the MERIT_LIST PersistableEnvelope protobuf message
type, which shouldn't be encountered as merit lists were never persisted
directly to a storage file.
This removes the last superfluous PersistableEnvelope implementations,
leaving the following type hierarchy:
PersistableEnvelope *
+- NavigationPath
+- PeerList
+- PersistableList *
+- ThreadedPersistableEnvelope *
| +- AccountAgeWitnessStore
| +- BlindVoteStore
| +- DaoStateStore
| +- PersistableNetworkPayloadList * is abstract
| +- ProposalStore
| +- SequenceNumberMap
| +- SignedWitnessStore
| +- TempProposalStore
| \- TradeStatistics2Store
\- UserThreadMappedPersistableEnvelope *
+- AddressEntryList
+- DisputeList *
| +- ArbitrationDisputeList
| +- MediationDisputeList
| \- RefundDisputeList
+- UserThreadMappedPersistableList *
| +- BallotList
| +- MyBlindVoteList
| +- MyProofOfBurnList
| +- MyProposalList
| +- MyReputationList
| +- MyVoteList
| +- PaymentAccountList
| \- UnconfirmedBsqChangeOutputList
+- PreferencesPayload
+- TradableList
\- UserPayload
- added a comment describing the `removeDust` method and its effects.
- use more descriptive variable names.
- made the logging more verbose to help log readers.
- use a constant for the dust limit
- add a notice to the user when dust is padded to the fee
Remove unused functionality to pass a custom 'toProto' function via a
constructor or setter, as it was unused and all subclasses override the
toProtoMessage() method anyway. In this way, the method may be removed
and the class (+ UserThreadMappedPersistableList) made abstract.
Also it appears PersistableHashMap was never used, so remove it.
Before, the graceful shutdown procedures have been executed in the
user thread. However, the sync mechanics for connections/offers
caused a lockup, as some little parts of the code do execute on the
user thread as well.
The actual System::exit commands have been scattered around various
places in the code. Sometimes, actual system exit depended on the
calling code to reach its end of execution.
Here, the tor object is a member variable and there are cases where
this member variable is not set yet.
Situation arose where a sigterm/sigint shutdown is requested and due
to the member variable not set tor was left running.
Remove an unused PersistableEnvelope interface from the following five
PersistableNetworkPayload implementations:
AccountAgeWitness, BlindVotePayload, ProposalPayload,
SignedWitness, TradeStatistics2
These already have corresponding *Store envelope classes which correctly
implement the interface.
Replaced the Scanner input read loop with upgraded joptsimple
dependency. Cli now takes a single, non-option program argument, runs
it and exits. Also removed the "stop client" command because there is
no input loop, but shutdown() is called for orderly channel shudown
before the jvm terminates. Also changed cmd syntax from camel case
to lowercase, mimicking bitcoin-cli.
Configured logback to supress all debug & info level netty output, and
bypassed logback to print results to System.out.
Display the account number on the same row as the sort code in the trade
step view, to prevent scrolling with the extra name field (as suggested
in the code review).
(This also affects the layout of old accounts without the extra field.)
Also apply the suggested popup text simplifications.
- added a comment describing the `removeDust` method and its effects.
- applied a fix to the declaration of an ArrayList.
- use more descriptive variable names.
- made the logging more verbose to help log readers.
This is done primarily for concision. This change also repackages
bisq.grpc => bisq.proto.grpc in anticipation of repackaging the
definitions in pb.proto from 'protobuf' to 'bisq.proto'. There should
not be any compatibility issues with doing this, but it's out of scope
here. When complete, the relationship between bisq.proto.grpc and
bisq.proto will be more intuitively clear, i.e. that bisq.proto.grpc has
certain dependencies on bisq.proto classes, but not the other way
around.
The close connection process did fire up worker threads to actually
close the connections. Yet, once all threads have been spawned,
the code proceeds assuming that there are no connections left open
without checking.
This lead to situations where tor has been shutdown already but
open connections. These connections tried to gracefully close but
without tor, that only caused a wall of exceptions.
Graceful shutdown has only be done in case of an error or when
using the GUI. A regular eg. seednode shutdown is not covered
though.
Now, SIGTERM and SIGINT triggers a graceful shutdown procedure.
Protobuf definition files were moved from common and core to a new
protodefinition subproject.
The two main reasons for doing this are to speed up builds by not
having to regenerate common and core protobuf classes
every time a change is made in those subprojects, and to remove
the grpc cli's direct dependency on core, and the transitive dependency
on common.
In order to accomplish this, cli's BisqCliMain was stripped of
its dependencies on common and core. Cli can only get the version
and balance now.
gRPC stub boilerplate was moved from BisqCliMain to a CliCommand
class to avoid some of the bloat that is going to happen as the
read-response loop supports more rpc commands.
Open an info popup in the take/create offer view, upon choosing to take
or make a new offer, to instruct the user to recreate their old Faster
Payments account with an owner full name (and preserved salt). Also show
the popup upon manual selection of any old (i.e. missing full name)
Faster Payments account from the trading account combo box, analogously
to the ClearXchange (Zelle) warning popup logic.
(Also eliminate slight differences between the private
'maybeShow[ClearXchange|FasterPayments]Warning' methods in TakeOfferView
and MutableOfferView, to make the code easier to deduplicate in future.)
This change fixes an issue whereby dust change outputs are
inadvertently created when users make withdrawals from their
wallets. (Funds -> Send Funds)
The solution taken here is to detect a dust TXO during the withdrawal
fee estimation process and add that amount to the fee thus eliminating
the dust output.
For example if the user has 1 BTC and goes to withdraw 0.99999900 BTC
it will detect a change TXO of 100 sats which is below the dust limit,
increase the fee by 100 sats and therefore withdraw 1 BTC.
This fix only applies to user withdrawals from their wallet. Other
use cases such as P2P trading, deposits and fees will be handled
separately.
Related to #4039
This change fixes an issue whereby dust change outputs are
inadvertently created during the trading process, unbenownst to the
user. The dust outputs cause the Bitcoin node to reject the
transaction and the trade then becomes stuck.
The solution taken here is to detect a dust TXO during the trade
process and remove it from the transaction before broadcasting.
Related to #4039