Commit Graph

27 Commits

Author SHA1 Message Date
djing chan
08118e387e
Use onDataReceived instead of onUpdatedDataReceived for considering p2p network state as initialized 2023-11-19 14:47:52 +07:00
Alva Swanson
c8f686ba56
Apply AppStartPlugin to all desktop applications 2023-09-10 22:10:09 +02:00
Alva Swanson
9ce8f83719
Gradle: Centralize application setup 2023-08-05 15:14:04 +02:00
Alva Swanson
d3419ec39d
statsnode: Move build configuration to its own build.gradle 2023-08-04 13:51:47 +02:00
Alva Swanson
c1c4caf87f
Gradle: Apply bisq.java-conventions to all projects 2023-02-05 22:02:13 +01:00
HenrikJannsen
3de6507a90
Add readme with info where it is used
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-11-25 15:24:03 -05:00
chimp1984
9c18899d66
Enforce inclusion of TradeLimits for headless apps
PaymentMethod use an instance of TradeLimits and expect that it
has been injected, which is the case for desktop but not for
headless apps, so we enforce injection in the app base classes
used for headless apps.

The validation of trade statistics use a method in PaymentMethod
where that dependency is required.

Tha hack how the PaymentMethod use TradeLimits is not nice, but
would require more effort for refactoring.
2021-11-23 21:34:43 +01:00
Steven Barclay
8104301b52
Use new Bitcoind(Client|Daemon) & remove btcd-cli4j
Migrate RpcService over to the new block notification daemon and RPC
client based on jsonrpc4j. Drop in own DTO classes in place of the ones
defined by btcd-cli4j and rename requestBtcBlock & addNewBtcBlockHandler
to requestDtoBlock & addNewDtoBlockHandler respectively.

Also remove now redundant filtering from the logback config and update
grade-witness.
2021-01-21 10:10:28 +00:00
chimp1984
c245026eff
Remove Storage and FileManager from logback 2020-10-03 12:48:15 -05:00
chimp1984
9232a5765b
Improve handling of UncaughtExceptionHandler 2020-09-30 22:06:51 -05:00
chimp1984
7ea3676c55
Refactor: Rename setup to setupUncaughtExceptionHandler
rename setupErrorHandler to checkCryptoPolicySetup
move UncaughtExceptionHandler code to setupUncaughtExceptionHandler
2020-09-30 21:55:50 -05:00
wiz
ca00433492
Set btcdcli4j loglevel to WARN for statsnode entrypoint, fixes #4537 2020-09-22 06:30:14 +09:00
Chris Beams
3f605f873f
Remove now unused BisqExecutable option handling
Option handling is now the responsibility of the Config class. JOpt's
OptionParser is no longer passed down to BisqExecutable subclasses'
doExecute method, as they can now rely on the Config abstraction.
2020-01-20 16:46:56 +01:00
Chris Beams
f5a1854762
Remove now unused BisqEnvironment class
In previous commits, BisqEnvironment functionality has been fully ported
to the new, simpler and more type-safe Config class. This change removes
BisqEnvironment and all dependencies on the Spring Framework Environment
interface that it implements.

The one exception is the pricenode module, which is separate and apart
from the rest of the codebase in that it is a standalone, Spring-based
HTTP service.
2020-01-20 16:41:19 +01:00
Chris Beams
849bd7c286
Move 'maxMemory' option handling to Config
Note that the default value of 600 advertised in BisqExecutable's option
handling was incorrect. The actual value had since become 1200 MB. This
correct default is now reflected in Config's option handling.
2020-01-20 16:39:30 +01:00
Chris Beams
b34d59c0a9
Introduce Config as replacement for BisqEnvironment
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.
2020-01-20 16:37:54 +01:00
Manfred Karrer
1e991d1b6e
Sync up code with SeedNodeMain 2019-04-16 18:00:09 -05:00
Manfred Karrer
a9466375f6
Use AppSetupWithP2PAndDAO instead iof AppSetupWithP2P 2019-04-16 17:59:31 -05:00
Chris Beams
931f369fb6
Include executable name and version in help output 2018-11-24 13:24:03 +01:00
Chris Beams
3cd467cc9f
Pull up remaining statsnode config to root 2018-11-04 18:00:56 +01:00
Chris Beams
bd1e7e273f
Pull up application plugin config to root 2018-11-04 16:27:52 +01:00
Chris Beams
1cdb39ab60
Pull up JesusMcCloud repo to root
Not all subprojects need it, but most do.
2018-11-04 14:28:14 +01:00
Chris Beams
4e1fa914a2
Pull up common repositories to root build.gradle 2018-11-04 14:20:55 +01:00
Chris Beams
95c8b8ddfa
Pull up application and configuration of java plugin 2018-11-04 14:20:55 +01:00
Chris Beams
3c1c402d40
Remove use of maven plugin
It is no longer necessary to publish Maven metadata about common, core
and other submodules as they are no longer managed as separate libraries
in separate repositories. The only way these modules should be getting
referenced is from within applications in this repository such as
desktop, statsnode, etc. Essentially, we're no longer publishing our
libraries for public consumption.
2018-11-04 13:19:06 +01:00
Christoph Atteneder
68fb1163a3
Add Java 10 configuration for merged repositories 2018-09-17 13:37:03 +02:00
Christoph Atteneder
d1be121b57
Merge statsnode repository at fc0a288 2018-09-14 11:53:35 +02:00