Exclude these tests from the default gradle test task. However, allow the option of having them included by specifying an optional gradle parameter (-Dtest.pricenode.includeSpotProviderTests=true).
This change moves gRPC boilerplate classes from the :core.grpc pkg
into a new :daemon.grpc pkg.
* The :core.grpc pkg was renamed :core.api, and no longer has any
dependencies on gRPC libraries.
* All core service classes in the :core.api pkg are now package
protected, excepting CoreApi, making CoreApi the only possible
entry point for all Grpc*Service -> -Core*Service calls.
* All grpc service classes in the :daemon.grpc pkg are now package
protected, excepting GrpcServer; the only class depending on
Grpc*Service class is GrpcServer.
* gRPC dependencies were moved from the gradle.build file's :core
subproject to :daemon.
Disable BitcoinAverage provider. Keep it registered as a provider to
ensure that the data structure returned by the pricenode to the Bisq
clients contain the hardcoded "btcAverageTs" key.
Revert from latest v5.0.0 to v4.2.2, since the newer version libraries
are compiled with Java 11, so they cannot be used as part of the Bisq
build process which still partially relies on Java 10.
Add support for a few exchanges to demonstrate and test the pricenode
aggregate rates.
The chose exchanges were selected because they each provide a varied
list of fiat and altcoins, with a substantial overlap between them. This
provides a robust initial set of datapoints and scenarios for aggregate
rates.
This change reorganizes the ':apitest' subproject to conform to a
typical gradle project, where all JUnit test cases are located in
the subproject's test sources folder. This makes running tests
from an IDE or gradle command line interface work as expected.
It will also help keep Travis CI configuration simple.
To avoid interfering in normal builds, the gradle ':apitest test' task
is disable by default; API tests will only run when a '-Dforce-true'
system property is passed to gradle.
To run API tests, run a normal build and install dao-setup files:
./gradlew clean build :apitest:installDaoSetup
Then run the tests:
./gradlew :apitest:test -Dforce=true
Try to avoid adding the '-Dforce=true' property to any other gradle
tasks, because this enables the ':apitest test' task, and would kick
off API tests before a normal build completed.
The build.gradle file was modified to support this code reorg, and
the 'org.junit.jupiter' dependendency was upgraded to v5.6.2 -- only
in the ':apitest:test' dependency definiitions, not anywhere else in
the bisq dependency definitions. The upgrade is necessary for
running ordered tests.
Since the scaffolding may be set up from either test cases (under the
test src folder), or a class under the main src folder, some changes
were made to ensure configuration paths are correct for either use
case. For example, when the 'bisq-apitest' script is run from the root
project directory, the current working directory is the root project
directory. When gradle or an IDE is used to run @Test cases, the
current working directory is :apitest subproject directory.
The main source's ApiTestMain class has been stripped down, and exists
only to keep the gradle build happy -- it needs a 'mainClassName'
property. But this main driver does have uses. See the class comments.
The other changes in this commit were made to fix style and syntax
problems.
Added :proto to the :apitest classpath for access to grpc
service stubs (to be) used in method (unit) tests. Added new
GrpcStubs class to expose the grpc service stubs to method and
scenario tests.
The larger goal of :apitest is end to end testing, where :cli's
console output is checked for correctness.
This change partially addresses two other important use cases:
* "method" testing -- an analog to unit testing
* "scenario" testing -- an analog to narrow functional testing
For example, tests in the apitest.method package will directly
call grpc services, and asserts will be made on the return values
instead of console output.
Tests in the apitest.scenario package will check correctness
for broader use cases, such as funding a wallet, encrypting then
unlocking a wallet for a specific time frame, or checking error
messages from the server when a "getbalance" call is made after
an "unlockwallet" timeout has expired.
The broader end to end tests will not use grpc stubs.
The large binary objects in p2p/src/main/resources/ are updated on every
Bisq release with the latest network data to avoid the need for new Bisq
clients to download all of this information from the network, which
would easily overload seed nodes and generally bog down the client.
This approach works well enough for its purposes, but comes with the
significant downside of storing all of this binary data in Git history
forever. The current version of these binary objects total about 65M,
and they grow with every release. In aggregate, this has caused the
total size of the repository to grow to 360M, making it cumbersome to
clone over a low-bandwith connection, and slowing down various local Git
operations.
To avoid further exacerbating this problem, this commit sets these files
up to be tracked via Git LFS. There's nothing we can do about the 360M
of files that already exist in history, but we can ensure it doesn't
grow in this unchecked way going forward. For an understanding of how
Git LFS works, see the reference material at [1], and see also the
sample project and README at [2].
The following command was used to track the files:
$ git lfs track "p2p/src/main/resources/*BTC_MAINNET"
Tracking "p2p/src/main/resources/AccountAgeWitnessStore_BTC_MAINNET"
Tracking "p2p/src/main/resources/BlindVoteStore_BTC_MAINNET"
Tracking "p2p/src/main/resources/DaoStateStore_BTC_MAINNET"
Tracking "p2p/src/main/resources/ProposalStore_BTC_MAINNET"
Tracking "p2p/src/main/resources/SignedWitnessStore_BTC_MAINNET"
Tracking "p2p/src/main/resources/TradeStatistics2Store_BTC_MAINNET"
We are using GitHub's built-in LFS service here, and it's important to
understand that there are storage and bandwidth limits there. We have
1G total storage and 1G per month of bandwidth on the free tier. We will
certainly exceed this, and so must purchase at least one "data pack"
from GitHub, possibly two. One gets us to 50G storage and bandwith.
In an attempt to avoid unnecessary LFS bandwidth usage, this commit also
updates the Travis CI build configuration to cache Git LFS files, such
that they are not re-downloaded on every CI build (see [3] and [4]
below). With that out of the way, the variable determining whether we
exceed the monthly limit is how many clones we have every month, and
there are many, though it's not clear how many are are Travis CI and how
many are users / developers.
Tracking these files via LFS means that developers will need to have Git
LFS installed in order to properly synchronize the files. If a developer
does not have LFS installed, cloning will complete successfully and the
build would complete successfully, but the app would fail when trying to
actually load the p2p data store files. For this reason, the build has
been updated to proactively check that the p2p data store files have
been properly synchronized via LFS, and if not, the build fails with a
helpful error message. The docs/build.md instructions have also been
updated accordingly.
It is important that we make this change now, not only to avoid growing
the repository in the way described above as we have been doing now for
many releases, but also because we are now considering adding yet more
binary objects to the repository, as proposed at
https://github.com/bisq-network/projects/issues/25.
[1]: https://git-lfs.github.com
[2]: https://github.com/cbeams/lfs-test
[3]: https://docs-staging.travis-ci.com/user/customizing-the-build/#git-lfs
[4]: https://github.com/travis-ci/travis-ci/issues/8787#issuecomment-394202791
Merging PR #4096, which moved protobuf defs out of core and common,
left :seednode without its required dependency on guava, causing
NoSuchMethodErrors.
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
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.
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.
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.
Some apache & logback dependency versions were bumped up, some
transitive dependencies declared as direct dependencies, and some
new exclusions were added to reduce the number of duplicated
dependencies in the build.
Also updated gradle-witness.gradle.
Here are some of the duplicated apache and logback dependencies
in the current build:
commons-codec-1.10.jar
commons-codec-1.9.jar
commons-io-2.4.jar
commons-io-2.6.jar
commons-logging-1.1.1.jar
commons-logging-1.2.jar
httpclient-4.0.1.jar
httpclient-4.5.3.jar
httpclient-4.5.5.jar
httpcore-4.0.1.jar
httpcore-4.4.6.jar
httpcore-4.4.9.jar
logback-classic-1.1.10.jar
logback-classic-1.1.11.jar
logback-core-1.1.10.jar
logback-core-1.1.11.jar
Upgraded:
codecVersion 1.9 -> 1.13
ioVersion 2.4 -> 2.6
langVersion 3.4 -> 3.8
httpclientVersion 4.5.3 -> 4.5.12
slf4jVersion 1.7.22 -> 1.7.25
New dependency declarations:
loggingVersion 1.2
httpcoreVersion 4.4.13
This commit reduces the number of build dependencies by 10.
Partial fix for #4086
In conjuction with the previous commits, this change removes entirely
Bisq's dependency on the Spring Framework, with the exception of the
pricenode module, which is not a Bisq node per se, but a standalone
Spring-based HTTP service.
Note that the removal of the Gradle `exclude` directive for
commons-logging is because Apache HttpClient still depends on it and
Spring had previously been providing it transitively. If this `exclude`
directive is not removed, NoClassDefFound errors get thrown at runtime
from HttpClient code unable to load the commons-logging Logger class.
Prior to this commit, BisqExecutable has been responsible for parsing
command line and config file options and BisqEnvironment has been
responsible for assigning default values to those options and providing
access to option values to callers throughout the codebase.
This approach has worked, but at considerable costs in complexity,
verbosity, and lack of any type-safety in option values. BisqEnvironment
is based on the Spring Framework's Environment abstraction, which
provides a great deal of flexibility in handling command line options,
environment variables, and more, but also operates on the assumption
that such inputs have String-based values.
After having this infrastructure in place for years now, it has become
evident that using Spring's Environment abstraction was both overkill
for what we needed and limited us from getting the kind of concision and
type saftey that we want. The Environment abstraction is by default
actually too flexible. For example, Bisq does not want or need to have
environment variables potentially overriding configuration file values,
as this increases our attack surface and makes our threat model more
complex. This is why we explicitly removed support for handling
environment variables quite some time ago.
The BisqEnvironment class has also organically evolved toward becoming a
kind of "God object", responsible for more than just option handling. It
is also, for example, responsible for tracking the status of the user's
local Bitcoin node, if any. It is also responsible for writing values to
the bisq.properties config file when certain ban filters arrive via the
p2p network. In the commits that follow, these unrelated functions will
be factored out appropriately in order to separate concerns.
As a solution to these problems, this commit begins the process of
eliminating BisqEnvironment in favor of a new, bespoke Config class
custom-tailored to Bisq's needs. Config removes the responsibility for
option parsing from BisqExecutable, and in the end provides "one-stop
shopping" for all option parsing and access needs.
The changes included in this commit represent a proof of concept for the
Config class, where handling of a number of options has been moved from
BisqEnvironment and BisqExecutable over to Config. Because the migration
is only partial, both Config and BisqEnvironment are injected
side-by-side into calling code that needs access to options. As the
migration is completed, BisqEnvironment will be removed entirely, and
only the Config object will remain.
An additional benefit of the elimination of BisqEnvironment is that it
will allow us to remove our dependency on the Spring Framework (with the
exception of the standalone pricenode application, which is Spring-based
by design).
Note that while this change and those that follow it are principally a
refactoring effort, certain functional changes have been introduced. For
example, Bisq now supports a `--configFile` argument at the command line
that functions very similarly to Bitcoin Core's `-conf` option.
- Rename package bisq.grpc => bisq.daemon.app
- Rename BisqGrpcApp => BisqDaemon
- Rename BisqGrpcServerMain => BisqDaemonMain
The script `bisq-grpc` has been renamed to `bisq-daemon` accordingly
(and will later be customized to `bisqd`). To see everything in action,
issue the following commands:
$ gradle build
$ ./bisq-daemon --appName=Bisq-throwaway --daoActivated=false
$ echo getVersion | ./bisq-cli # in a second terminal
1.2.3
The :grpc module will soon be renamed to :daemon. These two modules
represent two separate and equal modes of running bisq, either as a
desktop GUI or as a daemon. They are both applications, and one should
not depend on the other as it would be illogical and confusing to model
things that way. The reason for the current dependency from :desktop to
:grpc is because :grpc is the home of BisqGrpcServer. This change moves
this class up to :core, in a new bisq.core.grpc package, such that both
the :desktop and :daemon applications can pull it in cleanly.
The CoreApi 'facade' that BisqGrpcServer uses to abstract away bisq
internals has been moved from bisq.core to bisq.core.grpc as well and
for the same reasons detailed in 8b30c22d6.
This change also renames the Java package for generated grpc types from
bisq.grpc.protobuf to bisq.core.grpc (the same new package that
BisqGrpcServer and CoreApi now live in). Again, this is for reasons of
cohesion: BisqGrpcServer is the only user of these grpc-generated types,
and they should logically live in the same package (even if they
physically live in separate source dirs at the build level).
This change:
- Removes several superfluous dependencies not required for our
purposes with gRPC
- Cleans up the way Gradle source sets are managed for generated gRPC
sources and classes
- Makes use of Gradle's new `implementation`, `compileOnly` and
`runtimeOnly` dependency configurations where changes were otherwise
being made. See https://stackoverflow.com/a/47365147 for details.
Remaining uses of the now-deprecated `compile` and `runtime`
configurations should be eliminated in a refactoring separate and
apart from the present gRPC API work.
- Upgrades several existing dependencies to align with newer versions
of the same dependencies introduced transitively by grpc-* 1.25.0
libraries, including:
- protoc from 3.9.1 => 3.10.0
- gson from 2.7 => 2.8.5
Note that a number of the grpc-* libraries depend on Guava v28, and our
existing dependency on Guava v20 has *not* been upgraded to this newer
version because it is incompatible with the way we have used Guava's
Futures API. It appears that the grpc-* libraries function correctly
against this older version of Guava, and more investigation would be
required see whether upgrading our uses to the new Guava API is feasible
/ worth it. The way we are preventing this upgrade is with the use of
`exclude(module: "guava")` directives on grpc-* dependencies.
This change stubs out the `bisq-cli` utility with a placeholder main
method, such that the following now works:
$ gradle :cli:build
$ ./bisq-cli
Hello, World!
This reverts commit 26c053dae8 because
Kotlin compilation slows down the build, was applied too broadly to all
modules instead of just the one that needed it, and most importantly
because we never actually went ahead with converting anything of
importance to Kotlin. The commit being reverted was basically a demo,
converting a single test type to show what kind of difference it would
make.
This commit introduces a new `grpc` module including the following key
types:
- BisqGrpcServer: The API implementation itself, along with generated
gRPC Response/Reploy types defined in grpc/src/main/proto/grpc.proto.
- BisqGrpcServerMain: A 'headless' / daemon-like entry point for
running a Bisq node without the JavaFX desktop UI.
- BisqGrpcClient: A simple, repl-style client for the API that allows
the user to exercise the various endpoints as seen in the example
below.
In the `desktop` module, the BisqAppMain class has been modified to
start a BisqGrpcServer instance if the `--desktopWithGrpcApi` option has
been set to `true`.
In the `core` module, a new `CoreApi` class has been introduced
providing a kind of comprehensive facade for all Bisq functionality to
be exposed via the RPC API.
How to explore the proof of concept:
1. Run the main() method in BisqAppMain providing
`--desktopWithGrpcApi=true` as a program argument or alternatively, run
the main() method in BisqGrpcServerMain, where no special option is
required. In either case, you'll notice the following entry in the log
output:
INFO bisq.grpc.BisqGrpcServer: Server started, listening on 8888
2. Now run the main() method in BisqGrpcClient. Once it has started up
you are connected to the gRPC server started in step 1 above. To
exercise the API, type `getVersion` via stdin and hit return. You
should see the following response:
INFO bisq.grpc.BisqGrpcClient - 1.2.4
Likewise, you can type `getBalance` and you'll see the following
response:
INFO bisq.grpc.BisqGrpcClient - 0.00 BTC
and so forth for each of the implemented endpoints. For a list of
implemented endpoints, see BisqGrpcServer.start().
Note once again that the code here is merely a proof of concept and
should not be considered complete or production-ready in any way. In a
subsequent commit, the `--desktopWithGrpcApi` option will be disabled in
order to avoid any potential production use.
The content of this commit is the result of squashing a number of
commits originally authored by chimp1984 in the `chimp1984` fork's `grpc`
branch.
Co-authored-by: Chris Beams <chris@beams.io>
After the upgrade from Gradle 4.10.2 to 5.6.4 in commit 5fe71fa0a,
all of Bisq's shadowJar tasks started failing Gradle's incremental build
checks. This meant that repeated invocations of `gradle build` went from
a handful of seconds to more than a minute, because shadowJar tasks had
to be re-executed on every build.
For example, with --info enabled, one would see entries like this in the
build output:
> Task :seednode:shadowJar
Custom actions are attached to task ':seednode:shadowJar'.
Caching disabled for task ':seednode:shadowJar' because:
Caching has not been enabled for the task
Task ':seednode:shadowJar' is not up-to-date because:
Output property 'archiveFile' file [...]libs/seednode.jar has changed.
This problem was solved by in johnrengelman/shadow#524 and made
available in the project's recent 5.0.2 release. This patch simply bumps
the shadow plugin version to that value, and gets us back to snappy
incremental builds, e.g.:
$ gradle build
BUILD SUCCESSFUL in 7s
* New trade protocol (#3333)
* Remove arbitration key, cleanup
* Add BuyerAsMakerProcessDepositTxAndDelayedPayoutTxMessage
* Adopt trade protocol
- Add handler for DepositTxAndDelayedPayoutTxMessage
- Change handler for DepositTxPublishedMessage
- Add MakerSetsLockTime
- Rename MakerProcessPayDepositRequest to MakerProcessPayDepositRequest
- Rename MakerSendPublishDepositTxRequest to MakerSendsProvideInputsForDepositTxMessage
- Rename DepositTxPublishedMessage to DelayedPayoutTxSignatureRequest
- Rename MakerProcessDepositTxPublishedMessage to MakerAsBuyerProcessSignDelayedPayoutTxMessage
* Remove arbitratorKey
* Add new classes
* Add new message classes
* Add new task classes
* Renamed classed (no functional change yet)
* Add lockTime
* Add delayedPayoutTxSignature field
* Add useReimbursementModel field
* Add new classes
* Add setting.preferences.useReimbursementModel
* Apply renamed classes (new classes not added yet)
* Add useReimbursementModel
* Add preferences param
* Add new methods, cleanup
* Add daoFacade param, apply renaming
* Add delayedPayoutTx, lockTime and delayedPayoutTxId
- Support daoFacade param
* Remove DirectMessage interface
* Rename emergencySignAndPublishPayoutTx method, add new one for 2of2 MS
* Apply new protocol
* Apply new protocol
* Add renaming (no functional change yet)
* Add new messages, apply renaming
* Remove unneeded P2SHMultiSigOutputScript
* Remove PREFERRED_PROJECT_CODE_STYLE
* Refactor: Rename class
* Use InputsForDepositTxRequest instead of TradeMessage in handleTakeOfferRequest
* Do not sign deposit tx if maker is seller
We change behaviour that the maker as seller does not send the pre
signed deposit tx to the taker as the seller has more to lose and he
wants to control the creation process of the delayed payout tx.
* Apply new trade protocol to seller as maker version
* Apply new trade protocol
Delayed payout tx are now working for all scenarios but we use a small
hack to get around an issue with not receiving confirmations and the
peers tx.
We add a tiny output to both peers, so we see the tx and confirmation.
Without that only the publisher sees the tx and confirmations are not
displayed. Need further work to get that working without that extra
outputs.
* Set TRADE_PROTOCOL_VERSION to 2
* Add PeerPublishedDelayedPayoutTxMessage
We need add the delayed payout tx to the wallet once the peer publishes
it. We will not see the confidence as we do not receive or sent funds
from our address. Same is with dispute payouts where one peer does not
receive anything. Then the confidence is not set. It seems that is a
restriction in BitcoinJ or it requires some extra handling. We set the
confidence indicator invisible in the dispute case and that might be an
acceptable option here as well.
* Add refund agent domain
* Add refundAgentNodeAddress
* Apply refund domain
* Add refund views
* Apply refundAgent domain
* Support refundAgent
* Remove useReimbursementModel field
We dont need in the offer anymore the decision if reimbursement or
arbitration is chosen.
* Apply refundAgent payout
* Handle tx info and balances
* Remove mediation activation
* Add new tac accepted flag for v1.2.0 and adjust text
* Fix params for test classes
* Signed witness trading (#3334)
* Added basic UI for account signing for arbitrators
* Add domain layer for signed account age witnesses (credits ManfredKarrer and oscarguindzberg)
* Remove testing gridlines
* Arbitrator sign accountAgeWitnesses
Automatically filter to only sign accounts that
- have chargeback risk
- bought BTC
- was winner in dispute
* Handle chargebackrisk by currency
* Check winners only for closed disputes
* Show sign status of paymentaccounts in AccountsView
* Rename service to accountAgeWitnessService
* Refactor: Move account signing helpers to AccountAgeWitnessService
* Refactor: rename hasSignedWitness to myHasSignedWitness
* Show if witness is signed in offerbook view
* Use witness sign age for age comparison
* Refactor: rename to isTaker... to isMyTaker...
* Allow trading with signed witnesses
* Use witness age for showing account age icon
* Move AccountAgeRestrictions into AccountAgeWitnessService
* Handle trade limit of unverified accounts as normal case
* Avoid optional as argument
* Set trade limit depending on trade direction
* Avoid optional arguments
* Add text for seller as signer
* Seller with signer privilege signs buyer witness
* Fix merge issues
* Remove explicit check for risky offers
* Remove sellers explicit account age check
* Add limit check based on common accountAgeWitness function
* Fix arbitrator key event handling
* Filter accounts on tradelimit instead of maturity
* Fix test
* Buyer sign seller account
Add SIGNED_ACCOUNT_AGE_WITNESS capability
* Fix checks for signing at end of trade
Get correct valid accounts for offer
* Rename BuyerDataItem -> TraderDataItem
* Arbitrator sign both parties in a buyer payout dispute
* Only sign unsigned accountAgeWitnesses
* Remove unused code
* Add demo for material design icons
* Use different account age limits for sell/buy
* Fix signing interface for arbitrator
* Add signing state column to offer book
* Add signing state to fiat accounts overview
* Add signing state to selected fiat account
* Fix popover padding
* Add account signing state to peer info popup
* Retrieve only unsigned witnesses for arbitrator to sign
* Accounts signed by arbitrators are signers
* Disable test due to travis issues
* Improve witness handling (#3342)
* Fix comparison
* Add display strings for witness sign state
* Fix immaturity check
* Use accountAgeWitness age for non risky payment methods
* Show information about non risky account types
* Fix peer info icon account age text
* Complete new trade protocol (#3340)
* Improve handling of adding tx to wallet
* Add delayedPayoutTx to dispute
* Fix test
* Use RECIPIENT_BTC_ADDRESS from DAO for trade fee
* Set lockTime to 10 days for altcoins, 20 days others.
- Devmode uses 1 block
* Fix params
* Update text
* Update docs
* Update logging
if (log.isDebugEnabled()) only matches if logLevel is debug not
if it is INFO
* Remove log
* Remove arbitrator checks
* Remove arbitrator address
- It works not if not legacy arbitrator is registered.
We cannot remove too much from arbitration as we would risk to break
account signing and display of old arbitration cases.
Though if testing time permits we should try to clean out more of
arbitration domain what is not needed anymore.
* Use account signing state in accounts view (#3365)
* Add account signing icons to signing state in account display
* Remove unnecessary "." that caused layout issues in the past
* Add additional warning in the received payment popup for account signer
* Fix Revolut padding issues for currencies
* Hide signing icon for non-high-risk payment methods
* Add correct icon state and info text for account signing state
* Remove not implemented notification part
* Test self signing witnesses
* Change verified account limit factor to 0.5
* Account Signing: Add information popups for signing state (#3374)
* Add account signing icons to signing state in account display
* Remove not implemented notification part
* Hide time since signing column when not needed
* Remove fiat rounding popup as feature was introduced a long time ago already
* Add information popups for new signed states (only shown once for user) and minor clean-ups
* Update core/src/main/resources/i18n/displayStrings.properties
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
* Account Signing: Improve signed state notificaton (#3388)
* Remove new badge from Altcoin instant feature
* Remove new badge from percentage user deposit feature
* Fix line break issues in received payment confirmation popup
* Check if received payload fulfills signing state condition and not any personal witness
* Show additional badge for account sections to guide user to check out new signing states
* Fix account signing state in offer book (#3390)
* Account Signing: Fix verified usage (#3392)
* Rename witnessHash -> accountAgeWitnessHash
* Add enum for SignedWitness verification method
* Fix usage of isValidAccountAgeWitness
* Revert icon for signstate change
* Account signing: add signing state to payment account selection (#3403)
* Clean up dead code parts
* Add account signing state to payment account selection
* Account signing: revert dev date setting for trusted accounts (#3404)
* Revert temporary value for dev testing
* Only enable button if there are accounts to be signed
* Add trade limit exceptions (#3406)
* Remove dead code
* Add trade limit exception for accounts signed by arbitrator
* Update translations to adapt to new unified delay (#3409)
* NTP: Fix a couple of UI issues in the New Trade Protocol (#3410)
* Add badge support for refund agent (new arbitrator) tickets
* Fix translation typo
* Clean up arbitrator issues in translation
* Only show refund agent label to support staff
Every user should still see this role as arbitration
* NTP: Improve differentiation between mediation and new arbitration (#3414)
* Clean up property exposure
* Improve differentiation between mediation and arbitration cases
* Go to new refund view if it is no mediation and not open mediation notification if refund is already in progress
* Don't sign filtered accounts
* NTP: merge with master (#3420)
* Temporarily disable onion host for @KanoczTomas's BTC node
* Add Ergo (ERG) without Bouncy Castle dependency.
See #3195.
* List CTSCoin (CTSC)
* Tweak the English name of Japan Bank Transfer payment method
* Add mediator prefix to trade statistics
* List Faircoin (FAIR)
* List uPlexa (UPX)
* Remove not used private methods from BisqEnvironment
* Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- Rename BisqSetupCompleteListener to BisqSetupListener
- Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- make onInitP2pNetwork and onInitWallet default so no impl. required
* Start server at onInitWallet and add wallet password handler
- Add onInitWallet to HttpApiMain and start http server there
- Add onRequestWalletPassword to BisqSetupListener
- Override setupHandlers in HttpApiHeadlessApp and adjust
setRequestWalletPasswordHandler (impl. missing)
- Add onRequestWalletPassword to HttpApiMain
* Add combination (Blockstream.info + Mempool.space) block explorer
* Revert "Temporarily disable onion host for @KanoczTomas's BTC node"
This reverts commit d3335208bb.
* Temporarily disable KanoczTomas btcnode on both onion and clearnet
* Refactor BisqApp - update scene size calculation
* Refactor BisqApp - update error popup message build
* Refactor BisqApp - move icon load into ImageUtil
* Remove unused Utilities
* Increase minimum TX fee to 2 sats/vByte to fix#3106 (#3387)
* Fix mistakes in English source (#3386)
* Fix broken placeholders
* Replace non existing pending trades screen with open trades screen
* Update core/src/main/resources/i18n/displayStrings.properties
Co-Authored-By: Steve Jain <mfiver@gmail.com>
* Update message in failed trade popup
* Refactor BisqEnvironment
* Account Signing: Improve arbitrator signing flow (#3421)
* Pre-select a point of time 2 months in the past
So all arbitrator signed payment accounts will have their limits lifted completely
* Only show payment methods with high chargeback risk to be signed
* Show connected Bitcoin network peer info
* List Ndau (XND)
- Official project URL: https://ndau.io/
- Official block explorer URL: https://explorer.service.ndau.tech
* List Animecoin (ANI)
* Apply rule to not allow BSQ outputs after BTC output for regular txs (#3413)
* Apply rule to not allow BSQ outputs after BTC output for regular txs
* Enforce exactly 1 BSQ output for vote reveal tx
* Fix missing balance and button state update
* Refactor isBtcOutputOfBurnFeeTx method and add comments and TODOs
No functional change.
* Handle asset listing fee in custom method
We need to enforce a BSQ change output
As this is just tx creation code it has no consequences for the hard
fork.
* Use getPreparedBurnFeeTxForAssetListing
* Update comments to not use dust output values
* Fix missing balance and button state update
* Use same method for asset listing fee and proof of burn
Use same method for asset listing fee and proof of burn as tx structure
is same.
Update comments to be more general.
* Use getPreparedProofOfBurnTx
* Require mandatory BSQ change output for proposal fee tx.
We had in the doc stated that we require a mandatory BSQ change output
but it was not enforced in the implementation, causing similar issues
as in Asset listing and proof of burn txs.
* Add fix for not correctly handled issuance tx
* Use new method for issuance tx
// For issuance txs we also require a BSQ change output before the issuance output gets added. There was a
// minor bug with the old version that multiple inputs would have caused an exception in case there was no
// change output (e.g. inputs of 21 and 6 BSQ for BSQ fee of 21 BSQ would have caused that only 1 input was used
// and then caused an error as we enforced a change output. This new version handles such cases correctly.
* Handle all possible blind vote fee transactions
* Move check for invalid opReturn output up
* Add dust check at final sign method
* Fix incorrect comments
* Refactor
- Remove requireChangeOutput param which is always false
- Remove method which is used only by one caller
- Cleanup
* Add comment
* Fix comments, rename methods
* Move code of isBlindVoteBurnedFeeOutput to isBtcOutputOfBurnFeeTx
* Update account signing strings for v1.2 release (#3435)
* Update account signing strings for v1.2 release
* Add minor corrections from ripcurlx review
* Adjust tradeLimitDueAccountAgeRestriction string
So that it describes why an account isn't signed (in general) instead of
why it wasn't signed by an arbitrator.
* Account Signing/NTP: More improvements and fixes (#3436)
* Select the the correct sub view when a dispute is created
* Require capability REFUND_AGENT to receive RefundAgent Messages
* Remove unused return type for account signing
* Add new feature popup for account signing and new trade protocol
* Return void from account signing
* Fix bug with not updating vote result table at vote result block
* NTP: improve backwards compatibility for mediation (#3439)
* Improve readability of offer update
* Add type safeguard for dispute lists
* Set not existing dispute support type for clients < 1.2.0 from message support type
* Enable handling of mediation cases for old trade protocol disputes in 1.2.0 clients
* Remove unnecessary forEach
* Use correct formatter and add missing value for placeholder
* Bump version number
* Add sign all checkbox. Fix list entry display (#3450)
* Add sign all checkbox. Fix list entry display
* Add summary to log and clipboard
* Use safe version for seednodes (#3452)
* Apply shutdown and memory check again
To not risk issues with the release and seed nodes we merge back the
old code base for handling memory check and shutdowns.
The newly added changes for cross connecting between seed nodes cause
out of memory issues and require more work and testing before it can be
used.
* Revert code change for periodic updates between seed nodes.
The periodic updates code caused out of memory issues and require more
work and testing before it can be used.
* Arbitrator republish signedWitnesses on startup (#3448)
* Arbitrator republish signedWitnesses on startup
* Keep republish internal to SignedWitnessService
* Improve new feature popup for ntp and account signing (#3453)
* Do not commit delayedPayoutTx to avoid publishing at restart
Fixes https://github.com/bisq-network/bisq/issues/3463
BitcoinJ publishes automatically committed transactions.
We committed it to the wallet to be able to access it later after a
restart. We stored the txId in Trade and used that to request the tx
from the wallet (as it was committed). Now we store the
bitcoin serialized bytes of the tx and do not commit the tx before
broadcasting it (if a trader opens refund agent ticket).
* [1.2.0] Update client resources (#3456)
* Update bitcoinj checkpoint file
* Update data stores
* Update translations
* [1.2.0] Improve new feature popup (#3465)
* Improve layout of new feature popup
* Extract external hyperlinks into component to make it easier to update
* Comment in necessary showAgain check
* Add Raspberry Pi to build process (#3466)
* Add Raspberry Pi to build process
* Rename deploy variable to improve readability
* Update informational prompt upon creating fiat account with account signing details (#3467)
* Update informational prompt upon creating fiat account with account signing details
* Fix wrong buyer limit for first 30 days
* Set delayedPayoutTxBytes when setting delayedPayoutTx
Fixes https://github.com/bisq-network/bisq/issues/3473
The delayedPayoutTx is not committed to the wallet as long it is not
published. The seller who creates the delayedPayoutTx has not stored the
delayedPayoutTxBytes which caused a nullpointer after restart.
* Minor updates (#3474)
* Remove unnecessary log statement
This seems to be a left over log statement from debugging.
* Use a small delay for MakerSetsLockTime on regtest
When testing on regtest, not in devmode, we want a relatively short
delay to be able to test the delay period.
* Clarify payment limits up to 30 days after signing
* Update RECIPIENT_BTC_ADDRESS for regtest (#3478)
Use an address that is owned by the regtest wallet in the dao-setup.zip
file. This allows for easily verifying BTC trading fees are sent to
this address correctly. Also, it helps verify spending of the time lock
payout.
* Remove btc nodes from Manfred Karrer (#3480)
* Avoid null objects (#3481)
* Avoid null objects
* Remove check for type
Historical data can be arbitration instead of mediation (arbitration
was fallback at last update), so we need to tolerate the incorrect type
here. Is only for tickets from pre 1.2.
* Display appropriate account age info header
Depending on charge back risk type, accounts should show
accountAgeWitness age or time since signing
* Set amount for delayed payout tx to 0 (#3471)
We have shown the spent funds from the deposit tx to the bisq donation
address before. But that was incorrect from the wallet perspective and
would have lead to incorrect summary of all transaction amounts. We set
it now to 0 as we are not spending funds nor receiving any in our wallet.
* Check for result phase at activate method
Fixes https://github.com/bisq-network/bisq/issues/3487
* Only show warning for risky payment menthods (#3497)
* Fix style issues with dark mode (#3495)
* Addresses issues mentioned in https://github.com/bisq-network/bisq/issues/3482#issuecomment-546812730 (#3496)
* Clean up trade statistics from duplicate entries (#3476)
* Clean up trade statistics from duplicate entries
At software updates we added new entries to the extraMap which caused
duplicate entries (if one if the traders was on the new and the other on
the old version or at republishing). We set it now json exclude so avoid
that in future and clean up the map.
* Avoid repeated calls to addPersistableNetworkPayloadFromInitialRequest
For trade stat cleanup we don't want to apply it multiple times as it
is a bit expensive. We get from each seed node the initial data response
and would pollute with the second response our map again and if our node
is a seed node, the seed node itself could not get into a clean state and
would continue pollution other nodes.
* Refactor
Remove not used param
Rename method
Inline method
Cleanups
* Change unsigned to N/A
* [1.2.0] Update data stores and adding SignedWitnessStore (#3494)
* Update data stores and adding SignedWitnessStore
* Update translations
* Update cleaned TradeStatistics2Store and changes in other stores
* VoteResultView update results on any block in result phase
Avoid updating the result more than once per result phase but make
sure it's done if activated during the result phase
* [1.2.0] Format maker fee for BTC and BSQ correctly (#3498)
* Format maker fee for BTC and BSQ correctly
* Update tests
* Only automatically open popup if result wasn't accepted and disable action button when being accepted (#3503)
* Fix tradestatistics (#3469)
* Remove delayed re-publishing of tradeStatistics
This was done earlier when only maker was publishing trade statistics.
Now both traders do it so we get already higher resilience.
* Remove unused method
Forgot in prev. commit to remove also the method.
* Remove support for TradeStatistics2.ARBITRATOR_ADDRESS
* Add comment and set ARBITRATOR_ADDRESS deprecated
* Remove setting of arbitrator data from makers side
The 2 arbitrator related fields in Trade are only set by the maker and
not used anymore for reading, so it can be removed. The whole arbitrator
domain should be cleaned out some day, but because of backward
compatibility issues it id difficult to do it entirely at release date.
With release after v 1.2. when no old offers are out anymore we are
able to clean up that domain.
* Remove dev log
* Update translations
* [1.2.0] Improve dispute section (#3504)
* Improve wording for mediation summary and add specific next steps for refund agent case
* Select the first dispute case when entering the support section
* Revert to SNAPSHOT version
* Fix but with initialRequestApplied (#3512)
* Fix resource name (#3514)
* Remove minor version number in news popup
* Fix copy SignedWitnessStore db script
* Not show payment account details for blocked offers
* Use age of accountAgeWitness as basis for sell limits
* Bump version number
* Revert to SNAPSHOT version
* Merge v1.2.0/v1.2.1 with master (#3521)
* List Krypton (ZOD)
* Temporarily disable onion host for @KanoczTomas's BTC node
* Add Ergo (ERG) without Bouncy Castle dependency.
See #3195.
* List CTSCoin (CTSC)
* Tweak the English name of Japan Bank Transfer payment method
* List Animecoin (ANI)
* Add mediator prefix to trade statistics
* List Faircoin (FAIR)
* List uPlexa (UPX)
* Remove not used private methods from BisqEnvironment
* Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- Rename BisqSetupCompleteListener to BisqSetupListener
- Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- make onInitP2pNetwork and onInitWallet default so no impl. required
* Start server at onInitWallet and add wallet password handler
- Add onInitWallet to HttpApiMain and start http server there
- Add onRequestWalletPassword to BisqSetupListener
- Override setupHandlers in HttpApiHeadlessApp and adjust
setRequestWalletPasswordHandler (impl. missing)
- Add onRequestWalletPassword to HttpApiMain
* Add combination (Blockstream.info + Mempool.space) block explorer
* Revert "Temporarily disable onion host for @KanoczTomas's BTC node"
This reverts commit d3335208bb.
* Temporarily disable KanoczTomas btcnode on both onion and clearnet
* Refactor BisqApp - update scene size calculation
* Refactor BisqApp - update error popup message build
* Refactor BisqApp - move icon load into ImageUtil
* Remove unused Utilities
* Increase minimum TX fee to 2 sats/vByte to fix#3106 (#3387)
* Fix mistakes in English source (#3386)
* Fix broken placeholders
* Replace non existing pending trades screen with open trades screen
* Update core/src/main/resources/i18n/displayStrings.properties
Co-Authored-By: Steve Jain <mfiver@gmail.com>
* Update message in failed trade popup
* Refactor BisqEnvironment
* List Ndau (XND)
- Official project URL: https://ndau.io/
- Official block explorer URL: https://explorer.service.ndau.tech
* Show connected Bitcoin network peer info
* Not show payment account details for blocked offers (#3425)
* Add GitHub issue template for user reported bugs (#3454)
* Add issue template with steps to reproduce and actual/expected behavior
* Fix typo in .github/ISSUE_TEMPLATE.md
* Fix wrong auto merge
* Add CapabilityRequiringPayload to TradeStatistics2
With v1.2.0 we changed the way how the hash is created.
To not create too heavy load for seed nodes from
requests from old nodes we use the SIGNED_ACCOUNT_AGE_WITNESS
capability to send trade statistics only to new nodes.
As trade statistics are only used for informational purpose it will
not have any critical issue for the old nodes beside that they don't see the latest trades.
* Fix tradestat hash issue (#3529)
* Recreate hash from protobuf data
To ensure all data are using the new hash method (excluding extraMap) we
do not use the hash field from the protobug data but pass null which
causes to create the hash new based on the new hash method.
* Add filter.toString method and log filter in case of wrong signature
We have atm a invalid filter (prob. some dev polluted a test filter to mainnet)
* Change log level, add log
* Refactor: Move code to dump method
* Add TRADE_STATISTICS_HASH_UPDATE capability
We changed the hash method in 1.2.0 and that requires update to 1.2.2
for handling it correctly, otherwise the seed nodes have to process too
much data.
* Add logs for size of data exchange messages
* Add more data in log
* Improve logs
* Fix wrong msg in log, cahnge log level
* Add check for depositTxId not empty
* Remove check for duplicates
As we recreate the hash for all trade stat objects we don't need that
check anymore.
* Add logs
* Temporarily remove this part of the statistics
It prevents merging with master because through auto merge a duplication of this part of the code is happening and prevents Travis from succeeding
The controlsfx is a huge JavaFX components library (0.83MB as JAR).
Turns out, we only use a single component, the PopOver. Fortunately,
the PopOver is self-contained and easy to pull out from controlsfx.
This commit embeds the PopOver in the project and removes controlsfx
dependency. The embedded version is exactly the same as previously
used in the project, so no change in semantics should occur.
The reactfx was a 0.33MB dependency / 238 Java source files.
We only used it for FxTimer helper and to measure FPS in development mode.
The small FxTimer class got copied over into the project,
so there is no change in semantics.
The FPS measurement got replaced w/ com.sun.javafx.perf.PerformanceTracker,
an internal but long stable part of JavaFx. This is probably not a problem,
because it only concerns a rarely used, developer feature.
We still depend on this jar *indirectly* via bouncycastle:bcpg,
which is used for PGP signature verification of Bisq Desktop updates.
This gets us closer to prospect of removing Bounce Castle dependency
entirely in the future.
Rationale for this direction:
* We are really only using Bouncy Castle for PGP sig verification
* Java's builtin cryptography got vastly better since 2000
* We should prefer boring and proven cryptography anyway
* Australian projects should be considered compromised,
and Bouncy Castle is run by Australian non-profit organization
* Bouncy Castle is a heavy dependency totaling 3.6MB
One is supposed to only specify direct dependencies in build.gradle.
This commit removes two superfluous deps statements for the desktop
module. Other modules already follow the convention.
This does *not* remove any dependencies - it only cleans up how they
are specified.
Protobuf got updated to the latest released version 3.9.1.
The main motivation was to fix the following annoying warnings:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/qertoip/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/3.5.1/8c3492f7662fa1cbf8ca76a0f5eb1146f7725acd/protobuf-java-3.5.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Additionally, protobuf-gradle-plugin got updated to 0.8.10.