Commit Graph

5123 Commits

Author SHA1 Message Date
sqrrm
917ab4ee32
Merge pull request #4689 from chimp1984/revert-dao-data-json-export-changes
Revert changes for json export of dao data
2020-10-27 23:58:35 +01:00
ghubstan
b38507c6e6
Implement api method 'canceloffer' 2020-10-27 15:31:57 -03:00
ghubstan
027a7d5cd3
Stub out canceloffer api method
The implementation will be added to CoreOffersService in the next PR.
2020-10-27 14:54:50 -03:00
Oscar Guindzberg
8370bc98d5
Use LegacyAddress instead of Address for BSQ 2020-10-27 13:56:20 -03:00
ghubstan
a3631a022f
Implement api methods 'keepfunds', 'withdrawfunds'
The CoreTradesService was refactored to work for newly added api methods:

- keepfunds -- close trade, keep funds in bisq wallet

- withdrawfunds -- close trade, withdraw funds to external btc wallet

A getKey accessor was added to CoreWalletsService (needed by withdrawfunds impl).
2020-10-26 20:44:39 -03:00
ghubstan
a8decafc2f
Stub out api methods 'keepfunds', 'withdrawfunds'
This PR adds trade closing method stubs to keep funds in the
Bisq wallet or send them to an external BTC wallet.

- Add grpc protos
- Add new methods to GrpcTradesService, CoreApi
- Stub out implementations in CoreTradesService
- Add methods to CLI
2020-10-26 17:43:08 -03:00
chimp1984
8bfe9b82c8
Remove outliers when calculating BSQ rate
Add percentage for upper and lower threshold for outlier detection.
2020-10-25 18:34:22 -05:00
ghubstan
161dbade0d
Add getRole(tradeId) to core api
API users will need to see their role as maker/taker when looking at trade details.

- Add getRole(trade) to TradeUtil.
- Add getTradeRole(tradeId) to CoreApi, CoreTradesService.
- Add role field to TradeInfo proto and its wrapper class.
2020-10-25 16:22:20 -03:00
sqrrm
17745e3bee
Clean up riskFactor methods 2020-10-25 18:55:04 +01:00
sqrrm
b64c816047
Refactor getTradeLimit 2020-10-25 18:47:07 +01:00
sqrrm
56c8cd1507
Remove unused old activation date 2020-10-25 18:47:07 +01:00
ghubstan
bbd7a31c88
Remove unused import 2020-10-25 11:38:03 -03:00
ghubstan
95bcb1ef9c
Refactor PendingTradesDataModel methods -> TradeUtil
Scope of this refactoring is small;  more can be done, but the short
term goal is to share trade util logic with core api.

- Removed unused method getCurrencyCode()
- Made minor style changes
- Removed duplicated code block
2020-10-25 11:27:30 -03:00
ghubstan
24ba9215cd
Refactor PendingTradesViewModel methods -> TradeUtil & OfferUtil 2020-10-25 10:41:19 -03:00
ghubstan
ccd3c99f2e
Fix comment typos 2020-10-24 17:45:01 -03:00
ghubstan
296e4f98cb
Replace static TradeUtil with singleton TradeUtil
The API is going to need some desktop trade utilities, which should be
shared between :desktop and :core.api.
2020-10-24 17:26:10 -03:00
ghubstan
63cf436990
Add fields to grpc TradeInfo proto & wrapper 2020-10-24 16:27:03 -03:00
ghubstan
ab20225cd2
Add compiler warning suppression, remove comment 2020-10-24 16:25:20 -03:00
Christoph Atteneder
55c663ad47
Merge pull request #4676 from jmacxx/show_tx_fee
Show current tx fee rate on main screen
2020-10-24 11:40:34 +02:00
sqrrm
93a3188659
Merge pull request #4680 from chimp1984/add-InventoryMonitor-module
Add inventory monitor module
2020-10-23 19:26:53 +02:00
chimp1984
f7b44f1646
Improve logs 2020-10-23 11:02:47 -05:00
ghubstan
cb65de6d2e
Block on tx-fee-request in core TakeOfferModel init
Added license comment too.
2020-10-23 12:47:06 -03:00
sqrrm
9e76f5fdc3
Merge pull request #4606 from ghubstan/remove-dup-statuscheck
Delete redundant core.api.StatusCheck
2020-10-23 15:42:34 +02:00
chimp1984
330f14ff1f
Revert changes for json export of dao data
Backend is not ready yet and the changes are bigger than initially expected.

Was changed as part of 0d469066ce

See discussion at https://github.com/bisq-network/bisq/pull/4670
2020-10-23 01:39:49 -05:00
chimp1984
f1fdf3c0a5
Improve deviation model 2020-10-23 01:17:34 -05:00
chimp1984
5bdc5abe34
Add numAllConnectionsLostEvents 2020-10-23 01:17:34 -05:00
chimp1984
8c156eb5bf
Add peakNumConnections 2020-10-23 01:17:34 -05:00
chimp1984
5fb48fe72f
Fix error handling
Add all seeds
2020-10-23 01:17:34 -05:00
chimp1984
d08b24ece0
Add triggers for maxConnections and numConnections 2020-10-23 01:17:34 -05:00
chimp1984
1c779306ff
Add more warn/alert checks 2020-10-23 01:17:34 -05:00
chimp1984
7768e58b98
Shut down connection after response received
Various improvements...
2020-10-23 01:17:33 -05:00
chimp1984
1b83083ade
Add nodes from mike
Various improvements...
2020-10-23 01:17:33 -05:00
chimp1984
752208b3ca
Add InventoryItem enum
Add average and color codes to html
Add maxConnections
Add DeviationSeverity enum
Add custom seed node file
Use InventoryItem as key in inventory map instead of string
2020-10-23 01:17:33 -05:00
chimp1984
21bd85c488
Remove signature from GetInventoryRequest (as monitor is public it does not make sense to limit requests).
Add html output and webserver
2020-10-23 01:17:33 -05:00
chimp1984
d9ce8ce37a
Add readSeedNodePropertyFile method 2020-10-23 01:17:33 -05:00
chimp1984
ca7fe94c06
Add signature to request to limit the feature to requests from trusted nodes (monitor) 2020-10-23 01:17:32 -05:00
chimp1984
9dab186086
Move inventory package to core as we want to include other domain data as well like DAO state
Add more data to inventory map and change type of value to String.
2020-10-23 01:17:32 -05:00
chimp1984
329249845f
Extract method for filling seed nodes from property file 2020-10-23 01:17:32 -05:00
chimp1984
87bf30b98c
Remove torSetup.cleanupTorFiles() call.
This has caused the slow tor startup of about 20-30 sec. Without that it is about 5 sec.
2020-10-23 01:14:29 -05:00
jmacxx
7c7887d91f
Changes requested:
Shorten "synchronized" to "synced"
    Move Bitcoin network peer count to right with Bisq network peer count

Moved "Synchronizing DAO" to center for clarity/balance.
2020-10-22 22:01:37 -05:00
sqrrm
380a57a37a
Merge pull request #4685 from chimp1984/update-monitor-with-last-version-from-freimairs-repo
Update monitor with last version from freimairs repo
2020-10-22 23:38:56 +02:00
chimp1984
9a018ccd47
Adopt to new PersistenceManager 2020-10-22 14:49:16 -05:00
ghubstan
1f3554ef65
Remove redundant calculateTotalToPay() call
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and suggested in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510111662
2020-10-22 10:55:53 -03:00
ghubstan
d463dd14a0
Remove useless default tx fee calculations
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and suggested in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510110682

Also shortened comment lines to < 90 chars.
2020-10-22 10:41:04 -03:00
ghubstan
31a311903a
Simplify result handler argument
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and suggested in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510089605
2020-10-22 10:17:12 -03:00
ghubstan
fa0e05a336
Remove redundant getTrade(id) method
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and mentioned in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510090257
2020-10-22 10:09:35 -03:00
chimp1984
8baf34a643
Fix missing params 2020-10-21 13:41:50 -05:00
chimp1984
3f4d6e6f23
Use a thread in PersistenceManager for reading persisted files instead of using thread in client code
Before we use a thread in readFromResources and readAllPersisted. To avoid that client code need to deal with
threading we moved that to the PersistenceManager and changed the API accordingly so it will not return the persisted object but calls a consumer once it is completed with reading.
2020-10-21 13:41:50 -05:00
jmacxx
f7dfcd9636
Show current tx fee rate on main screen
Tx fee rate is shown in the footer alongside "Synchronized with
Bitcoin Mainnet (using Tor) (x sat/vB)".

Fixes #4412
2020-10-20 19:20:27 -05:00
ghubstan
ac8ed8dd06
Add 'confirmpaymentreceived' api method
- Implement confirmpaymentsent on server and cli side

- Enable confirmpaymentreceived method tests
2020-10-20 16:51:48 -03:00
ghubstan
3d2b90fb96
Add 'confirmpaymentsent' api method
- Implement confirmpaymentsent on server and cli side

- Enable confirmpaymentsent method tests
2020-10-20 16:20:40 -03:00
ghubstan
e809af37cc
Add 'takeoffer' API method
- Add new core.offer.takeoffer.TakeOfferModel

	Would have been nice to move more logic from
	bisq.desktop.main.offer.takeoffer.TakeOfferDataModel,
	but it has JFX dependencies that cannot be use in :core.

- Add grpc protos to support takeoffer, confirmpaymentsent, confirmpaymentreceived

	Only takeoffer is implemented in this commit.

- Refactor OfferInfo grpc proto wrapper, and add offer state field

- Add new TradeInfo grpc proto wrapper

- Implement takeoffer on server and cli side

- Refactor offer/trade tests, add test cases
2020-10-20 16:00:05 -03:00
ghubstan
ab6be23516
Refactor offer/trade related classes in core and desktop
These refactoring changes are for reducing existing and potential
duplication coming with the addition of new trading protocol support
in the gRPC API.  Some minor styling and logic simplification changes
are also include.

- Convert OfferUtil to injected singleton, and move various offer related
  utility methods into it.

- Delete both MakerFeeProvider classes, which were wrappers around the same
  static old OfferUtil method.

- Inject OfferUtil into CreateOfferDataModel, CreateOfferViewModel,
  TakeOfferDataModel, TakeOfferViewModel, MutableOfferDataModel,
  MutableOfferViewModel, OfferDataModel, EditOfferDataModel,
  EditOfferViewModel

- Refactor TakeOfferViewModel

	Use OfferUtil, remove unused fields & methods.
	Made minor logic simplification, style and formatting changes.

- MutableOfferDataModel

	Made minor logic simplification, style and formatting changes.

- MutableOfferView uses new paymentAccount.isHalCashAccount().

- MutableOfferViewModel

	Refactored to use new VolumeUtil, CoinUtil, OfferUtil.
	Removed unused fields & accessors.
	Made minor style change.

- Refactored OfferDataModel to use new OfferUtil

- Refactor CreateOfferService

	Inject and use OfferUtil
	Move some utility methods to OfferUtil
	Remove unused fields

- Offer

	Refactored to use new VolumeUtil for volume calculations.
	Made stateProperty and errorMessageProperty fields private.

- PaymentAccount

	Moved isHalCashAccount type check to this class.
	Moved getTradeCurrency logic to this class.

- Contract, radeStatistics2, TradeStatistics3

	Refactored to use new VolumeUtil for volume calculations.

- Trade

	Refactored to use new VolumeUtil for volume calculations.
	Made minor logic simplification, style and formatting changes.

- CoinUtil

	Moved some coin utility methods into this class

- CoinUtilTest

	Moved (coin related) tests from CoinCryptoUtilsTest and OfferUtilTest
	into CoinUtilTest, and deleted OfferUtilTest, CoinCryptoUtilsTest.

- Adjust create and edit offer tests to model refactoring
2020-10-20 15:06:44 -03:00
Christoph Atteneder
ebe4618bfe
Merge pull request #4655 from bisq-network/release/v1.4.0
Release/v1.4.0 and v1.4.1
2020-10-20 09:10:12 +02:00
chimp1984
294b45dbad
Republish trade statistics if not found in existing trade stats.
Remove republishing at SellerProtocol as we don't know the capability of the peer at that moment and as we also want to republish for completed trades.
2020-10-16 14:13:01 -05:00
Christoph Atteneder
4a20cc8379
Merge pull request #4637 from jmacxx/clickable_urls
Make URLs in popup notices clickable
2020-10-16 14:38:54 +02:00
Oscar Guindzberg
21f5cd83e0
Remove getAllAddressesFromActiveKeys() 2020-10-15 14:30:51 -03:00
sqrrm
44394adb1e
Merge pull request #4608 from ghubstan/getoffer-for-id
Add new 'getoffer offer-id' api method
2020-10-15 11:14:05 +02:00
Christoph Atteneder
b7c6c42475
Update bitcoinj checkpoints for v1.4.0 2020-10-15 09:13:17 +02:00
Christoph Atteneder
4f26544333
Merge pull request #4648 from chimp1984/dont-include-dead-txs-in-limit-check
Dont include dead transactions in check for unconfirmed txs chain
2020-10-15 09:12:49 +02:00
jmacxx
ce1efa1337
Remove unused strings, ref:
https://github.com/bisq-network/bisq/pull/4637#issuecomment-708721299
2020-10-14 20:54:09 -05:00
chimp1984
8b404e1954
Exclude time-locked txs at isUnconfirmedTransactionsLimitHit
For published delayed payout transactions we do not receive the tx confidence
so we cannot check if it is confirmed so we ignore it for that check. The check is any arbitrarily
using a limit of 20, so we don't need to be exact here. Should just reduce the likelihood of issues with
the too long chains of unconfirmed transactions.
2020-10-14 20:17:48 -05:00
ghubstan
8394bd1f64
Tidy up getOffer(id) 2020-10-14 19:26:35 -03:00
jmacxx
b17c5c9353
Make URLs in popup notices clickable
Fixes #4623

URLs in Javafx label controls are not clickable, so separate them out to
one or more clickable Hyperlinks displayed at the footer of the popup.

The approach taken for this is to embed the tag `[HYPERLINK:]` in the
message around a link that you want to be handled this way.  The links
can be anywhere within the popup message, in the same order that they
will be displayed.  Using the tag has the advantage of being optional,
and does not require new code to be written for each individual popup.

Refactor to be more flexible; allowing inline hyperlinks

Codacy nits.
2020-10-14 13:42:51 -05:00
chimp1984
fe3828e21f
Dont include dead transactions in check for unconfirmed txs chain 2020-10-14 10:13:12 -05:00
chimp1984
feb4e5230f
Use toString for NullPointerException 2020-10-14 09:52:53 -05:00
Christoph Atteneder
06e7e4b8f1
Update bitcoinj checkpoints for v1.4.0 2020-10-14 15:39:21 +02:00
Mike Rosseel
58f5066e0a
Resolve conflict in 'core/src/main/resources/btc_mainnet.seednodes'. 2020-10-14 15:15:30 +02:00
Mike Rosseel
000f319930
Merge branch 'master' into update-mr-seednode 2020-10-14 14:07:09 +02:00
Mike Rosseel
d1b936e7c5
Adding two torv3 seednodes, removing torv2 nodes 2020-10-14 13:54:22 +02:00
wiz
866b227fcc
Replace emzy's v2 seednodes with new v3 seednodes 2020-10-14 12:54:25 +02:00
Christoph Atteneder
b57ae3532f
Merge pull request #4644 from wiz/update-emzy-seednodes-v3
Replace emzy's v2 seednodes with new v3 seednodes
2020-10-14 12:54:05 +02:00
sqrrm
c41bfd7164
Merge pull request #4643 from chimp1984/add-get-inventory-msg
Add GetInventory messages
2020-10-14 12:22:00 +02:00
wiz
1f2002ad0e
Replace emzy's v2 seednodes with new v3 seednodes 2020-10-14 18:24:19 +09:00
chimp1984
5f9d3d1f0d
Add GetInventory messages
This will be used for monitoring seed nodes.
Instead of requesting all data (we cannot request all in fact as it is too large)
we request the number of items the node has.

This code will not have any impact atm. It will be triggered once a new monitor module gets added which
will send the GetInventoryRequest to the seeds.
2020-10-13 23:30:39 -05:00
chimp1984
b0bc3d0c87
Remove lombok getter for date and rename getDate to getDateAsLong and getTradeDate to getDate. 2020-10-13 20:46:05 -05:00
chimp1984
cc5bdfaf9c
Change data response behaviour
Add DateSortedTruncatablePayload interface for TradeStatistics2

We check first if we need to truncate dateSortedTruncatablePayloads, if so we have sorted by date and truncate in the way that we receive the most recent data. We define the maxItems in the class implementing the interface (3000 for trade stats).
Later we apply the maxEntries check the combined list and if we need to truncate here as well (10 000) we have added the dateSortedTruncatablePayloads at the end so those will get truncated with higher prio.

There is also a bit wrong handling in the previous code that we check for max limits before the shouldTransmitPayloadToPeer filter. Should be fixed in another PR for master...
2020-10-13 20:31:09 -05:00
Christoph Atteneder
e30a7e041c
Merge pull request #4632 from oscarguindzberg/fixSendNonBsq
Fix send non bsq funds
2020-10-13 21:57:35 +02:00
Oscar Guindzberg
864700775b
Accept segwit addresses when sending non-BSQ funds 2020-10-13 15:14:40 -03:00
sqrrm
be08c86c18
Merge pull request #4640 from chimp1984/update-trade-stat-resource-file
Update trade stat resource file
2020-10-13 18:51:14 +02:00
chimp1984
b71930252f
Exclude depositTxId as it seems that leads to
duplicates (we got about 1000 objects more without excluding it,
so seems some traders had set it to null, prob. due bugs)
2020-10-13 11:29:54 -05:00
sqrrm
129eaa76c4
Merge pull request #4638 from chimp1984/fix-mediation-bug
Fix bug at mediation with old client
2020-10-13 18:20:17 +02:00
chimp1984
3b4d109652
Fix bug at mediation with old client
If dispute opener is old client the delayed payout tx is not sent in mediation case (only in refund agent cases).
At 1.4.0 we send it as well in mediation case and the mediator get a warning shown in case its missing.
To avoid that warning we check if dispute is of refund agent type and only check in that case.
This can be removed once we have enforced update to 1.4.0 (segwit will require that).
Also added checks to not add null entries in the duplicates checks.
2020-10-13 10:26:20 -05:00
Christoph Atteneder
e5dd316a0a
Merge pull request #4631 from oscarguindzberg/fixPeerGroupStop
Stop PeerGroup only if running
2020-10-13 09:26:41 +02:00
chimp1984
0d469066ce
Change write json files to disk strategy
We have written all files each time at each new block which accumulated to about
1 GB of data, this led to stability issues and very high disk IO for the explorer nodes.

Now we write only the data of the new block. We also remove the deletion of all
files at startup.
The dao state is still written in a monolithic file so that cannot be optimized
but we added a new directly where we add each block named by block height.
Looking up the latest written file tells us our last persisted block.
So all that data is equivalent to the monolithic daoState data which should
be removed once the webapp devs have implemented the change to use the blocks directory.
2020-10-12 23:51:15 -05:00
Oscar Guindzberg
1c0655e2c7
Stop PeerGroup only if running 2020-10-12 17:10:39 -03:00
Christoph Atteneder
41b2e6a56d
Merge pull request #4619 from chimp1984/fix-memo-bug-issue-4616
Set memo to tx after tx creation and not on broadcast success
2020-10-12 09:12:11 +02:00
Christoph Atteneder
1eb730a431
Merge pull request #4626 from chimp1984/avoid-duplicate-trade-stats
Use hash at conversion also for local data to avoid duplicates.
2020-10-12 09:10:11 +02:00
Oscar Guindzberg
8e93e4be0b Use aesKey in Wallet.toString() 2020-10-11 20:42:53 -03:00
chimp1984
1f0590dc95
Use hash at conversion also for local data to avoid duplicates. 2020-10-11 17:16:17 -05:00
chimp1984
4d2f1b5d43
Set memo to tx after tx creation and not on broadcast success, as broadcast success might not get called (even it is broadcast -> pending btcj bug) 2020-10-10 19:01:51 -05:00
chimp1984
39c8ade5ef
Cleanups: Remove outdated TODOs, fix typos 2020-10-08 22:00:57 -05:00
chimp1984
18a27e9067
Republish trade statistics from seller side if peer capability is know. This is not the case without getting PR #4609 merges as well.
We only do it for 2 weeks after planned release time as then it can be assumed that enough nodes have updated that the normal publishing will distribute the object sufficiently.
2020-10-08 18:49:15 -05:00
chimp1984
17f4ae2b54
Add check that size is > LOOK_BACK_RANGE 2020-10-08 18:49:14 -05:00
chimp1984
213050c3d1
Add filter for excluding null objects 2020-10-08 18:49:14 -05:00
chimp1984
fa374b99fb
Do conversion in a thread to not block UI thread. takes about 4 seconds on my machine.
Add shutdown method to TradeStatisticsConverter and call it via TradeStatisticsManager. Now as we have a reference to TradeStatisticsConverter in we don't need the hack anymore in applyInjector.
Set log level for com.neemre.btcdcli4j.core.client.ClientConfigurator to error as there is an expected warn log because of the outdated version.
2020-10-08 18:49:14 -05:00
chimp1984
f56fe42ae1
Add injector.getInstance(TradeStatisticsConverter.class) to BisqExecutable to enforce inclusion.
Cleanups, renamings
2020-10-08 18:49:14 -05:00
chimp1984
9016cb6c32
Prune mediator and refund agent entries for all entries beside the last 100 we use for the selection algorithm. 2020-10-08 18:49:14 -05:00
chimp1984
0e70a99c42
Adjust tests, remove tests which do not make sense anymore 2020-10-08 18:49:13 -05:00
chimp1984
52be126667
Apply TradeStatistics3 to client classes 2020-10-08 18:49:13 -05:00
chimp1984
c4a4c878b8
Apply TradeStatistics3 to TradeStatisticsManager and some related classes 2020-10-08 18:48:52 -05:00
chimp1984
98207518d6
We "hack" TradeStatistics2StorageService to fulfill our needs:
1. We do not want that initial data request/response use old trades statistics for excluded key hashes.
Thats why we return an empty map in getMap.
2. We do not read resource file as we have removed that.
3. We do not persist as we convert the existing data and re-publish as new data, or at startup we convert the old data to the new one and then delete the file.
2020-10-08 18:48:52 -05:00
chimp1984
6d43c09b33
Delete TradeStatistics (version 1) 2020-10-08 18:48:52 -05:00
chimp1984
b2665bdd2c
let seller publish trade statistics only if peer is updated user. If not the peer will publish only. 2020-10-08 18:48:52 -05:00
chimp1984
a522d0ade9
Refactor: Rename class 2020-10-08 18:48:17 -05:00
chimp1984
b75aa6771f
Refactor: Move class 2020-10-08 18:48:17 -05:00
chimp1984
406bcfb064
Remove PublishTradeStatistics from buyer protocol
We let seller publish trade stats to avoid those issues with duplicated entries as trade date is different.
We could fix that to use the same trade date,  but it seems to be not needed that both traders are publishing and the
risk if a trade stat does not get successfully published does not cause real problems.
There is guarantee anyway that the data is broadcast even if both do it.

In case we still want to do it from both sides we need to use the sellers trade date which is exchanged early in the trade
protocol but yet not further used beside for account age check.
2020-10-08 18:48:17 -05:00
chimp1984
00bed02839
Add TradeStatistics3 and related classes
Add TRADE_STATISTICS_3 Capability
Add TradeStatistics3 to proto resolvers
Make message TradeStatistics2 deprecated
2020-10-08 18:48:17 -05:00
chimp1984
c88bc1c99c
Use custom class MailboxItem instead of Tuple
Rename mailboxMap to mailboxItemsByUid
2020-10-08 18:23:04 -05:00
chimp1984
351db88992
Use a hashset instead of list to avoid duplicates. Filter out my own node from persisted peers.
Remove log in DisputeAgentManager which gets called repeatedly
2020-10-08 18:23:03 -05:00
chimp1984
0686079946
Refactor: Rename method 2020-10-08 18:23:02 -05:00
chimp1984
25bfe2d6ad
Add findPeersCapabilities method
Impl. applyCapabilities

Cleanups
2020-10-08 18:23:02 -05:00
chimp1984
9404e8fa87
Add NO_ADDRESS_PRE_FIX capability.
Add `boolean contains(Capability capability)` method
2020-10-08 18:23:00 -05:00
Oscar Guindzberg
261e0ec714
Check migratedWalletToSegwit is true 2020-10-08 17:26:24 -03:00
Oscar Guindzberg
87da2ae349
Do a backup of the wallet before segwit migration 2020-10-08 16:33:58 -03:00
Oscar Guindzberg
417daf5692
Use bitcoinj 0.15.8 (commit a733034) 2020-10-08 16:33:58 -03:00
Oscar Guindzberg
a747e83211
Fix add segwit keychain for encrypted wallet 2020-10-08 16:33:57 -03:00
Oscar Guindzberg
694446c296
Switch back to LegacyAddress for fee estimation 2020-10-08 16:33:57 -03:00
Oscar Guindzberg
1d82c01670
Improve error handling for P2WPKH 2020-10-08 16:33:57 -03:00
Oscar Guindzberg
499d7b7d35
Use try-with-resources 2020-10-08 16:33:56 -03:00
Oscar Guindzberg
3554e19084
setWitness(): Code clean up 2020-10-08 16:33:56 -03:00
Oscar Guindzberg
d1aaf3e4eb
Construct dummy outputs with LegacyAddress 2020-10-08 16:33:56 -03:00
Oscar Guindzberg
5524ba3e97
BtcWalletService.getFreshAddressEntry(): code clean up 2020-10-08 16:33:55 -03:00
Oscar Guindzberg
b9e404f0e2
Make it clear segwit is not used for the trade protocol yet. 2020-10-08 16:33:55 -03:00
Oscar Guindzberg
86ddd06e27
Validate AddressEntry.segwit 2020-10-08 16:33:55 -03:00
Oscar Guindzberg
4a2c0ad75a
Make codacy happy 2020-10-08 16:33:54 -03:00
Oscar Guindzberg
01455d2b20
Enable reusing unused AVAILABLE entries 2020-10-08 16:33:54 -03:00
Oscar Guindzberg
78a2a43d48
Remove unused import 2020-10-08 16:33:54 -03:00
Oscar Guindzberg
d1aeedd98b
Remove unused WalletService.findKeyFromPubKeyHash() 2020-10-08 16:33:53 -03:00
Oscar Guindzberg
e2f74f0250
Don't create a wallet address when not needed 2020-10-08 16:33:53 -03:00
Oscar Guindzberg
58afc00282
Don't create an extra address at startup 2020-10-08 16:33:53 -03:00
Oscar Guindzberg
1f3c585c35
Serialize tx without segwit
This is for backwards compatibility with bisq nodes that have not
upgraded to bitcoinj 0.15.
2020-10-08 16:33:52 -03:00
Oscar Guindzberg
f9f5d92941
Add segwit/legacy checbox for address creation 2020-10-08 16:33:52 -03:00
Oscar Guindzberg
a9cc28f65a
AddressEntryList: arbitrator entry use P2PKH 2020-10-08 16:33:52 -03:00
Oscar Guindzberg
a3708485f9
New AddressEntry: use different script types
Use P2WPKH for AVAILABLE context and P2PKH for the rest.
Disable reusing unused AVAILABLE entries until segwit support is
mandatory in Bisq.
2020-10-08 16:33:51 -03:00
Oscar Guindzberg
d8b755794e
WalletService: adapt to segwit wallet 2020-10-08 16:33:51 -03:00
Oscar Guindzberg
25515710ab
TradeWalletService: adapt to segwit wallet 2020-10-08 16:33:51 -03:00
Oscar Guindzberg
0f4c66f43d
Comment out segwit BSQ account path
Segwit is not used for BSQ
2020-10-08 16:33:50 -03:00
Oscar Guindzberg
0c7f3456b6
Fix log msg in BtcCoinSelector 2020-10-08 16:33:50 -03:00
Oscar Guindzberg
e85c66b810
Stop using LegacyAddress for btc addresses 2020-10-08 16:33:49 -03:00
Oscar Guindzberg
ced357ce25
AddressEntry: Add boolean segwit flag 2020-10-08 16:33:49 -03:00
Oscar Guindzberg
cd28660069
Add a P2WPKH keychain for existing wallets 2020-10-08 16:33:49 -03:00
Oscar Guindzberg
f13a7b164c
Create a P2WPKH keychain for new btc wallets 2020-10-08 16:33:48 -03:00
Christoph Atteneder
2d06946c18
Update translations for v1.4.0 2020-10-08 09:41:42 +02:00
Christoph Atteneder
90d00a2c7f
Merge pull request #4603 from ncstdc/patch-2
Update displayStrings.properties for Mediation Popup
2020-10-08 09:30:45 +02:00
ghubstan
29d1905f31
Add new 'getoffer offer-id' api method
There are a number of use cases where a user may want to see a single
offer instead of every offer for a currency pair on the buy or sell side.
The changes are:

- Add getoffer to grpc.proto
- Add new method to GrpcOffersService, CoreApi, CoreOffersService
- Add new method to CLI
- Adjust create offer tests to use this new convenience
2020-10-07 12:09:13 -03:00
chimp1984
076af0a3e1
Do not log full tiler object in case of an invalid Filter
Instead log signerPubKeyAsHex and creation date. We have currently the old filter still around (intended) so we get that log called and it would confuse ppl reading the log without knowing more about the context.
2020-10-07 09:42:01 -05:00
ghubstan
449a0b25bd
Delete redundant core.api.StatusCheck
We are migrating to the new core.app.AppStartupState class.
2020-10-07 11:28:46 -03:00
sqrrm
723a1f5cf9
Merge pull request #4592 from chimp1984/improve-bisq-setup
Improve bisq setup
2020-10-07 14:08:10 +02:00
Christoph Atteneder
7d14ff37d8
Merge pull request #4595 from ghubstan/remove-duplicated-supporttype-enum
Remove redundant DisputeAgentType enum
2020-10-07 09:37:15 +02:00
Christoph Atteneder
66f6e49f83
Merge pull request #4596 from ghubstan/refactor-placeoffer-tx-handling
Simplify GrpcOffersService#createOffer (refactor)
2020-10-07 09:30:40 +02:00
chimp1984
7ecae0e5be
Set amounts before setting state, as the state triggers the check where the amount is needed 2020-10-06 11:30:44 -05:00
dchoe
39d37e1070
Update displayStrings.properties
Better wording
2020-10-06 10:44:09 -05:00
chimp1984
4a0fe3e62e
Move checks to enable confirm to Trade
Use it in view to disable button
2020-10-06 10:40:39 -05:00
chimp1984
0e89c27021
Add mediationResultAppliedPenaltyToSeller method to Trade
Add util methods to DisputeState
Impl. paymentReceivedEnabled method for SellerProtocol
Impl. paymentStartedEnabled method for BuyerProtocol
Remove notDisputed method as not used anymore

Add final keywords
2020-10-06 10:22:22 -05:00
ghubstan
5f9b1e6e1a
Format exception message 2020-10-06 11:30:17 -03:00
ghubstan
30e6dae90b
Change return type to void
The prior Offer return type is redundant and confusing given the
new offer is passed up via the Consumer<Offer> resultHandler.
2020-10-06 11:19:08 -03:00
Christoph Atteneder
049b6209b7
Merge pull request #4594 from ghubstan/refactor-api-price-service
Tidy up CorePriceService (refactor)
2020-10-06 10:04:00 +02:00
ghubstan
3f3f4f06f5
Use consumer::accept instead of a countdown latch
This is more readable and stylistically consistent.
2020-10-05 14:32:05 -03:00
ghubstan
2d34730bd8
Fix method name 2020-10-05 13:51:48 -03:00
ghubstan
dd67acc153
Simplify GrpcOffersService#createOffer (refactor)
Push the placeOffer call down into CoreOffersService#createOffer,
and use a countdown latch to wait for async placeOffer to
complete.
2020-10-05 12:23:54 -03:00
chimp1984
474c4138d2
Refactor: rearrange methods 2020-10-04 17:24:03 -05:00
chimp1984
52f5f2f064
Extract domain initialisation to domainInitialisation class 2020-10-04 17:24:03 -05:00
chimp1984
d6c3ccd605
Add AppStartupState and DomainInitialisation.accountAgeWitnessService
See comments to classes for reasoning.
2020-10-04 17:24:03 -05:00
chimp1984
e179ee4e32
Use Collection for constructor which is called from the fromProto methods.
We do not set the collection as list but we fill the list created via the createList method.
2020-10-04 16:13:45 -05:00
chimp1984
d18b243322
Do not use persistNow for snapshots but requestPersistence
This avoids frequent write at dao sync and better performance.
2020-10-04 13:34:28 -05:00
chimp1984
f9f33aa16d
Add PersistableListAsObservable
Remove ObservableList methods from PersistableList
Let DisputeList and TradableList extend PersistableListAsObservable
Fix param names
2020-10-04 13:18:25 -05:00
chimp1984
f7c2464fbc
Fix typo 2020-10-04 13:16:49 -05:00
ghubstan
9942529448
Remove redundant DisputeAgentType enum
Use existing SupportType enum instead, and map the valid api
'registerdisputeagent' method's dispute-agent-type parameter
names to SupportType.
2020-10-03 15:42:27 -03:00
ghubstan
0cc998c4e2
Tidy up CorePriceService
Remove unnecessary String.format call and do a null check.
2020-10-03 14:48:49 -03:00
chimp1984
e9db7c6808
Rename Priority to Source. This should make it more clear what is the intention of the usage.
Rename:
LOW to NETWORK
MID to PRIVATE_LOW_PRIO
HIGH to PRIVATE

Change delay of MID/PRIVATE_LOW_PRIO from 30 min to 2 hours (we had different datastores before using it, now its only real low prio stores)

Add comment to each enum
2020-10-03 12:48:23 -05:00
chimp1984
137b5e81d1
Enforce that clients set the priority. Remove the initialize methods which did not have priority as a param.
Make initializePersistenceManager in StorageService abstract to enforce in concrete class to define priority.

Change priorities for future renaming to a different meaning. instead of priority we want to describe the category: private data, public data,.... will come in next commit
2020-10-03 12:48:22 -05:00
chimp1984
b712445e34
Remove duplicate startApplication call. Remove checkCryptoSetup call and fields used only for that. 2020-10-03 12:48:22 -05:00
chimp1984
32238f2050
Rename getClosedTradables and getFailedTrades to getObservableList 2020-10-03 12:48:22 -05:00
chimp1984
c789650d0b
Move methods to base class 2020-10-03 12:48:22 -05:00
chimp1984
e88a810dd0
Revert exit code to 1 as it was before. Not sure if there have been some scripts for seeds which expect an error code at shutdown for auto restart. I remotely remember there have been something... 2020-10-03 12:48:22 -05:00
chimp1984
e242c54dab
Refactor: Rename getTradesAsObservableList to getObservableList 2020-10-03 12:48:22 -05:00
chimp1984
5f47ed20d8
Use decrementAndGet instead of getAndDecrement 2020-10-03 12:48:21 -05:00
chimp1984
ccfda5b043
Cleanups, add generics, add final, remove unused code/comments/todos, 2020-10-03 12:48:21 -05:00
chimp1984
fa0d261397
Fix remaining issues, cleanups, add persit calls, remove unused code,...
Sorry too tired to create another 20 commits...
2020-10-03 12:48:21 -05:00
chimp1984
253c6c3336
Remove unneeded param. Add requestPersistence calls. Cleanup removeTrade and addTrade methods 2020-10-03 12:48:21 -05:00
chimp1984
b901f358a7
Add missing persist calls. Add generics. Remove persist method. Add final. 2020-10-03 12:48:21 -05:00
chimp1984
7b4611e177
Add requestPersistence call
Cleanups
2020-10-03 12:48:21 -05:00
chimp1984
a797413c7e
Remove persist method 2020-10-03 12:48:21 -05:00
chimp1984
42e10f28b7
Apply generics 2020-10-03 12:48:21 -05:00
chimp1984
482bc56036
Use PersistenceManager 2020-10-03 12:48:20 -05:00
chimp1984
9da13c35f2
Refactor: Rename persist to requestPersistence 2020-10-03 12:48:20 -05:00
chimp1984
fac4200825
Remove unused fields, apply new params 2020-10-03 12:48:20 -05:00
chimp1984
e825613f5c
Use PersistenceManager 2020-10-03 12:48:20 -05:00
chimp1984
e0ea742a47
Use PersistenceManager 2020-10-03 12:48:20 -05:00
chimp1984
986f1bf33c
Use PersistenceManager. We do not persist inside openOffer anymore but from outside 2020-10-03 12:48:19 -05:00
chimp1984
406afa9dad
Use PersistenceManager. Add setAll method 2020-10-03 12:48:19 -05:00
chimp1984
c3c869b5ad
Use PersistenceManager 2020-10-03 12:48:19 -05:00
chimp1984
f4165dc9af
Use PersistenceManager 2020-10-03 12:48:19 -05:00
chimp1984
2582f58e0a
Use PersistenceManager 2020-10-03 12:48:19 -05:00
chimp1984
f6be9b0f6b
Use PersistenceManager 2020-10-03 12:48:19 -05:00
chimp1984
4f18577002
Extend PersistableList, remvoe storage 2020-10-03 12:48:19 -05:00
chimp1984
63fe1c9dbd
Remove storage 2020-10-03 12:48:18 -05:00
chimp1984
2d91c268d0
Remove storage and persist calls. Remove unused methods 2020-10-03 12:48:18 -05:00
chimp1984
8a6b2a77d6
Use PersistenceManager. Make disputeList final 2020-10-03 12:48:18 -05:00