Christoph Atteneder
80246e5d66
Update data stores for v1.9.6
2022-10-20 12:19:30 +02:00
chimp1984
5a77be64e3
Fix typo
2022-09-28 19:47:49 -05:00
chimp1984
42e8e511da
Add check isWasTruncated
2022-09-20 19:25:19 -05:00
chimp1984
5a7714786c
Fix missing argument in test
2022-09-20 18:33:24 -05:00
chimp1984
8725070c90
Add wasTruncated to onComplete handler
...
If truncated repeat requests
2022-09-20 18:33:23 -05:00
chimp1984
c4467ce03b
Set wasTruncated flag at GetDataResponse
...
If we truncated dateSortedTruncatablePayloads we set outTruncated flag to true (used for trade statistics)
2022-09-20 18:33:23 -05:00
chimp1984
c40d4ffffa
Add wasTruncated flag
...
Indicates if data response contained all data or was truncated
2022-09-20 18:33:23 -05:00
chimp1984
7d7eb13131
Reduce max entries to 5000
2022-09-20 18:33:23 -05:00
Christoph Atteneder
aefb342691
Not use git lfs anymore
2022-09-15 09:21:37 +02:00
Christoph Atteneder
7cddb74168
Update data stores for v1.9.5
2022-08-22 11:34:59 +02:00
jmacxx
8e21682e92
Add P2P network status indicator.
2022-08-18 10:46:39 -05:00
Christoph Atteneder
2561de9951
Merge pull request #6285 from jmacxx/tor_log_level
...
Set Tor logging to DEBUG level at startup
2022-07-12 09:53:10 +02:00
jmacxx
9893f52e57
Set Tor logging to DEBUG level at startup.
2022-07-08 12:26:58 -05:00
Christoph Atteneder
9bd1fd1423
Update data stores for v1.9.3
2022-06-27 17:00:56 +02:00
chimp1984
d1987330c7
Remove log
2022-05-31 12:34:51 +02:00
Christoph Atteneder
cbc1a6f43b
Update data stores for v1.9.0
2022-04-28 13:11:05 +02:00
jmacxx
c3e6a80f78
Add inbound Tor connectivity test.
2022-04-12 14:43:30 -05:00
Bisq GitHub Admin
c6293b5273
Merge pull request #6096 from bisq-network/release/v1.8.4
...
Release/v1.8.4
2022-03-11 15:57:55 +01:00
Christoph Atteneder
85714febf0
Update data stores for v1.8.3 (again)
2022-02-28 17:08:32 +01:00
xyzmaker123
e6320cdf06
Optimize imports
2022-02-28 13:53:38 +01:00
Christoph Atteneder
05f4f68356
Update data stores for v1.8.3
2022-02-24 20:48:17 +01:00
sqrrm
f315bd299e
Merge pull request #5993 from bisq-network/release/v1.8.2
...
Release/v1.8.2
2022-01-24 16:26:35 +01:00
Christoph Atteneder
06ab4dfa2a
Update data stores for v1.8.1
2022-01-18 11:38:30 +01:00
jmacxx
c9235299a8
Postpone accessing preferences BridgeAddressProvider until needed by Tor.
...
Previously they would be accessed too early when preferences had not
yet been read from disk. Now we access them when Tor is started.
2022-01-16 11:38:14 -06:00
Christoph Atteneder
a1d0e570d1
Apply minor improvements and clean-ups
2022-01-11 12:36:44 +01:00
jmacxx
9334cffc89
Feature enabling log file upload to mediators
2022-01-06 13:22:44 -06:00
jmacxx
30706f05e2
No. of threads is already logged every 10 minutes from printSystemLoad
2021-12-24 12:40:49 -06:00
jmacxx
0b66fdcbef
Statistics logging changes
...
Add thread count to periodic logged statistics
Increase the statistic logging interval from 5 minutes to 1 hour
2021-12-23 14:42:18 -06:00
Christoph Atteneder
7d66264453
Update data stores for v1.8.0 (again, again)
2021-12-08 21:13:21 +01:00
chimp1984
81d112bdf3
Add null checks
...
Return early at connection if stopped
Cleanup logs
2021-12-08 19:39:37 +01:00
chimp1984
ee1371276f
Reduce timeouts
...
Add logs when shutdown starts
2021-12-08 19:39:37 +01:00
chimp1984
c58d9a9edd
Do not shut down networkNode and Tor in parallel as network node
...
requires still tor when sending close messages.
Reduce timeout from 5 sec to 2 sec.
Reduce timeout for executor shutdown from 500 ms to 100 ms
2021-12-08 19:39:36 +01:00
Steven Barclay
484afbc522
Code cleanup: replace (Bi)Function<..,Boolean> with (Bi)Predicate<..>
...
Replace 'BiFunction<T, U, Boolean>' with the primitive specialisation
'BiPredicate<T, U>' in HashCashService & FilterManager.
As part of this, replace similar predicate constructs found elsewhere.
NOTE: This touches the DAO packages (trivially @ VoteResultService).
2021-12-07 09:35:41 +01:00
Christoph Atteneder
10433e3a71
Update data stores for v1.8.0 (again)
2021-11-24 13:51:10 +01:00
Christoph Atteneder
dd6af18350
Update data stores for v1.8.0
2021-11-24 11:47:53 +01:00
chimp1984
a00667bbc2
Clean up log
2021-11-09 20:00:34 +01:00
Christoph Atteneder
c3bb0162d6
Fix Git LFS pointers
2021-11-09 19:03:01 +01:00
chimp1984
80e7c452ca
Add BsqBlocks resources and update DaoState
...
Add BsqBlocks resources
2021-11-09 13:01:20 +01:00
Christoph Atteneder
2d3cf388eb
Merge pull request #5788 from jmacxx/fix_refresh_ttl_exception
...
Gracefully handle null data in refresh offer message and log error
2021-11-04 10:06:44 +01:00
chimp1984
f7fcaa915e
Add BSQ swap code
2021-11-02 16:18:50 +01:00
chimp1984
d5dfdb4a35
Merge branch 'chimp-bsq-swap-1' into bsq-swap-low-risk-refactorings-2
...
# Conflicts:
# core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java
# core/src/main/java/bisq/core/api/CoreOffersService.java
# core/src/main/java/bisq/core/btc/listeners/TxConfidenceListener.java
# core/src/main/java/bisq/core/notifications/alerts/market/MarketAlerts.java
# core/src/main/java/bisq/core/offer/OpenOfferManager.java
# core/src/main/java/bisq/core/offer/bisq_v1/CreateOfferService.java
# core/src/main/java/bisq/core/offer/bisq_v1/OfferPayload.java
# core/src/main/java/bisq/core/offer/bisq_v1/TakeOfferModel.java
# core/src/main/java/bisq/core/offer/bisq_v1/TriggerPriceService.java
# core/src/main/java/bisq/core/proto/ProtoDevUtil.java
# core/src/main/java/bisq/core/trade/TradeManager.java
# core/src/main/java/bisq/core/trade/bisq_v1/TradeResultHandler.java
# core/src/main/java/bisq/core/trade/bisq_v1/TradeUtil.java
# core/src/main/java/bisq/core/trade/model/bisq_v1/Trade.java
# core/src/main/java/bisq/core/trade/protocol/FluentProtocol.java
# core/src/main/java/bisq/core/trade/protocol/Provider.java
# core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java
# core/src/main/java/bisq/core/trade/protocol/TradeProtocolFactory.java
# core/src/main/java/bisq/core/trade/protocol/TradeTaskRunner.java
# core/src/main/java/bisq/core/trade/protocol/bisq_v1/DisputeProtocol.java
# core/src/main/java/bisq/core/trade/protocol/bisq_v1/model/ProcessModel.java
# core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/ApplyFilter.java
# core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/TradeTask.java
# core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/maker/MakerCreateAndSignContract.java
# core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/taker/TakerVerifyAndSignContract.java
# core/src/main/java/bisq/core/trade/statistics/TradeStatistics2.java
# core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java
# core/src/main/java/bisq/core/trade/txproof/xmr/XmrTxProofService.java
# desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java
# desktop/src/main/java/bisq/desktop/main/PriceUtil.java
# desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java
# desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTrade.java
# desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java
# desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java
# desktop/src/main/java/bisq/desktop/main/market/spread/SpreadViewModel.java
# desktop/src/main/java/bisq/desktop/main/offer/BuyOfferView.java
# desktop/src/main/java/bisq/desktop/main/offer/OfferView.java
# desktop/src/main/java/bisq/desktop/main/offer/SellOfferView.java
# desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferDataModel.java
# desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferView.java
# desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferViewModel.java
# desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferDataModel.java
# desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java
# desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferViewModel.java
# desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java
# desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java
# desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java
# desktop/src/main/java/bisq/desktop/main/overlays/windows/OfferDetailsWindow.java
# desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesDataModel.java
# desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModel.java
# desktop/src/main/java/bisq/desktop/main/portfolio/failedtrades/FailedTradesDataModel.java
# desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersDataModel.java
# desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersView.java
# desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java
# desktop/src/main/java/bisq/desktop/util/DisplayUtils.java
# desktop/src/test/java/bisq/desktop/main/offer/bisq_v1/createoffer/CreateOfferDataModelTest.java
# desktop/src/test/java/bisq/desktop/main/offer/bisq_v1/createoffer/CreateOfferViewModelTest.java
# desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookListItemMaker.java
# desktop/src/test/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModelTest.java
# desktop/src/test/java/bisq/desktop/maker/OfferMaker.java
# monitor/src/main/java/bisq/monitor/metric/P2PMarketStats.java
2021-11-02 16:04:12 +01:00
jmacxx
28eb3f04ca
Add error log message for context
2021-11-02 09:56:24 -05:00
jmacxx
e65a992b26
Gracefully handle null data in refresh offer message and log error
2021-10-29 12:18:18 -05:00
Christoph Atteneder
8bcfbea477
Update data stores for v1.7.5
2021-10-26 11:57:36 +02:00
chimp1984
63c385bbba
Add support for RemoveDataMessage in testCapability
...
Refactor testCapability
2021-10-21 17:44:18 +02:00
chimp1984
23af4558b5
Add filterPredicate
2021-10-21 10:13:19 +02:00
chimp1984
b80b6ec836
Cleanups
2021-10-21 10:12:57 +02:00
chimp1984
07354191a6
Remove handling of BundleOfEnvelopes in send method.
...
It is basically never executed and throttling would avoid it as well.
Cleanups, Rename
2021-10-21 10:12:28 +02:00
sqrrm
5e84713520
Merge pull request #5730 from bisq-network/release/v1.7.4
...
Release/v1.7.4
2021-09-28 15:05:42 +02:00
Christoph Atteneder
29ede5f3c4
Update data stores for v1.7.4
2021-09-23 10:01:04 +02:00
chimp1984
4dd7061c27
Refactor service filtering
...
Make it more clear that we expect only one
matching service which can handle the payload.
2021-09-21 10:35:18 +02:00
chimp1984
c90c62c2cd
Remove getAppendOnlyDataStoreMap method for tests
...
Use appendOnlyDataStoreService.getMap(persistableNetworkPayload)
instead.
2021-09-21 10:33:25 +02:00
chimp1984
b9106b0795
Update tests
2021-09-21 01:04:13 +02:00
chimp1984
19b52ba6f6
When daoActivated is set to false the DAO P2P data
...
are still received from seed nodes and processed but
as the services for processing the payloads are not
added the data is inefficiently processed.
The getMap returned a flattened map of all maps in
all services which can be quite large.
We use now a filtered map with calling canHandle
first. Also the put got optimized to indicate in the
return value if there has been a service found to add
the payload. If not we do not invoke the listeners and
do not broadcast.
To not request the DAO P2P data would be better but I
don't see a easy way how to do that as the P2P network
is not aware of the type of data. Some market interface
could be used and a flag at the request to the seed node
to indicate if those types should be included but that
does feel too customized for a special use case. The
DAO P2P data is not that big as well, so I think for now
that fix should be good enough.
2021-09-20 23:59:17 +02:00
ghubstan
7351b08850
Reduce # of hash calculations in UI OfferBook view
...
We can cache an offer payload hash as soon as its `offerFeePaymentTxId`
is set. (The payload hash cannot be calculated until the object can
be transformed into a protobuf message, which requires a non-null
offerFeePaymentTxId.)
Another benefit is removal of the payload hash argument from the
`OfferBookListItem` constructor.
Changes include
- `OfferPayload` Added `transient byte[] hash` field + getter method
(where hash is calculated and cached).
- `OfferBookService` Removed `P2PDataStorage.ByteArray hashOfPayload`
parameter from `OfferBookChangedListener` listener methods
`onAdded` & `onRemoved`. (Hash is cached in `OfferPayload`.)
- `P2PDataStorage` Added null check to `ByteArray` class constructor.
- `OfferBook` Adjusted for change to `OfferBookChangedListener`.
Also removed redundant payload hash null checks.
- `TakeOfferDataModel` and `MarketAlerts` Adjusted for change to
`OfferBookChangedListener`.
- `OfferBookListItem` Removed overloaded constructor with
`@Nullable P2PDataStorage.ByteArray hashOfPayload` parameter.
(Field value is set from cached offer payload hash.)
- `OfferBookViewModelTest` and `OfferMaker` Adjusted test and test fixture:
do not attempt to create offer payloads without an `offerFeePaymentTxId`.
2021-09-01 15:48:35 -03:00
Christoph Atteneder
839175b27c
Resynced from last release and synced again
2021-08-27 20:02:14 +02:00
Christoph Atteneder
ce0b301cf1
Update data stores for v1.7.3
2021-08-27 09:30:43 +02:00
Christoph Atteneder
b92d1c25ac
Update data stores for v1.7.2
2021-07-19 20:06:02 +02:00
chimp1984
f169d845d4
Comment out trace logs
...
In profiler the printMap method got invoked (though it should
not if added as parameter in log)
2021-07-07 22:49:40 +02:00
Christoph Atteneder
d9b84e2a84
Update data stores for v1.7.0
2021-06-25 16:18:10 +02:00
sqrrm
8bc60d0909
Merge pull request #5573 from ripcurlx/add-hint-to-upgrade-to-tor-v3
...
Add hint to upgrade to tor v3
2021-06-23 13:41:03 +02:00
Christoph Atteneder
e9ef413722
Display a tor node address v3 upgrade prompt
...
whenever the client is in a state to do so without any problems.
2021-06-14 16:10:47 +02:00
jmacxx
cc7346544b
feature to enable user avatars and tags in Disputes
2021-06-08 15:15:52 -05:00
Christoph Atteneder
3be0795eea
Update data stores for v1.6.5
2021-05-25 10:40:45 +02:00
Christoph Atteneder
fa920fc0a1
Update DAO state for v1.6.3
2021-04-29 20:20:49 +02:00
Christoph Atteneder
b5d772bc48
Update data stores for v1.6.3
2021-04-26 11:11:29 +02:00
Christoph Atteneder
d3233bac7a
Update data stores for v1.6.0
2021-03-24 10:53:24 +01:00
Steven Barclay
f21379160b
Merge branch 'release/v1.6.0' into implement-segwit-for-bsq
2021-03-20 23:18:49 +00:00
jmacxx
f936210717
fix mailbox bootstrap issue
2021-03-02 14:34:03 -06:00
jmacxx
b3263be5e9
Fix initialization ordering issue
...
TradeManager must be inited before MailboxMessageService
2021-02-24 09:13:52 +01:00
Christoph Atteneder
a691b26de4
Update witness stores
2021-02-23 11:16:29 +01:00
Christoph Atteneder
8e78cfa2b7
Update data stores for v1.5.7
2021-02-22 15:52:18 +01:00
chimp1984
3c38fd67eb
Remove boolean return value for requestPreliminaryData
...
and call onNoSeedNodeAvailable instead.
2021-02-19 10:09:05 +01:00
chimp1984
f73408a79e
Call onNoSeedNodeAvailable if return value from requestPreliminaryData is false
...
We did not do all the calls before (like on p2pDataStorage), so that changes behaviour.
2021-02-19 10:09:05 +01:00
chimp1984
e57c26ecb0
Refactor: Extract method from duplicated code
2021-02-19 10:09:05 +01:00
chimp1984
1e6744ddc0
Use same behaviour in onNoSeedNodeAvailable as in onUpdatedDataReceived
2021-02-19 10:09:04 +01:00
chimp1984
45e4aaa24d
Refactor: Rename onBootstrapComplete to onBootstrapped
2021-02-19 10:09:04 +01:00
chimp1984
c6868f1bed
Call p2PDataStorage.onBootstrapComplete() before
...
mailboxMessageService.onBootstrapped(); and onUpdatedDataReceived
mailboxMessageService depends on p2PDataStorage so we make sure the
p2PDataStorage is updated before we update the mailboxMessageService state.
2021-02-19 10:09:04 +01:00
chimp1984
49e9f72d6e
Merge onUpdatedDataReceived and onNoSeedNodeAvailable to onBootstrapped
2021-02-19 10:09:04 +01:00
chimp1984
44fcfb86bb
Call onNoSeedNodeAvailable on mailboxMessageService at onNoSeedNodeAvailable
2021-02-19 10:09:04 +01:00
chimp1984
d39cdaa33e
Fixes https://github.com/bisq-network/bisq/issues/5204
...
Remove SetupListener implementation from MailboxMessageService.
Remove requestDataManager
Add onNoSeedNodeAvailable method
Call onNoSeedNodeAvailable from P2PService
2021-02-19 10:09:03 +01:00
chimp1984
fcaad5580b
Use readableFileSize instead of division by 1024 for kb display in statistic logs
2021-02-18 11:40:10 -05:00
Steven Barclay
b4ad6bf637
Upgrade jsonrpc4j & Jackson; simplify BitcoindClient
...
Change jsonrpc4j version from 1.5.3 to 1.6.0.bisq.1, forked to the Bisq
repo from the recent 1.6.0 release. The forked version changes the class
'com.googlecode.jsonrpc4j.HttpException' to be public, instead of (prob.
mistakenly) package private, so we can avoid using reflection to catch
it and re-throw as a 'bisq.network.http.HttpException'. Remove the now
unused constructors from the latter.
As part of this, upgrade Jackson to the latest stable (2.12.1) release,
since jsonrpc4j now depends on a newer version than the previous 2.8.10.
2021-02-04 07:51:38 +00:00
chimp1984
9041bf4938
onUpdatedDataReceived must be called in the correct order.
...
We cannot use a listener at RequestDataManager as the order
is not defined if doing so.
So we use P2PService as our controlling entity to call
further clients in the correct order.
2021-01-31 19:38:46 +01:00
Christoph Atteneder
60fc17be2c
Update data stores for v1.5.5
2021-01-25 14:18:21 +01:00
Steven Barclay
f34231abb6
Factor out failure callback logic into new Utilities method
2021-01-21 10:08:23 +00:00
Steven Barclay
dbe4953f63
Add replacement bitcoind RPC client using jsonrpc4j
...
Create a new 'BitcoindClient' interface and a corresponding builder, to
replace the old 'com.neemre.btcdcli4j.core.client.BtcdClientImpl' class
from the btcdcli4j library. This is instantiated by jsonrpc4j using a
dynamic proxy. It provides only a cut down version of the bitcoind RPC
API, exposing the methods 'getblock', 'getblockcount' & 'getblockhash',
as they are the only ones currently being used by RpcService.
Add corresponding Jackson-annotated DTO classes to model the JSON
structures returned by bitcoind, very similar to the classes provided by
btcdcli4j. Note that we use Double instead of BigDecimal to represent
fractional fields (difficulties + coin amounts in BTC), as they have
more consistent Jackson (de)serialisation and appear to be able to
faithfully round-trip numeric fields produced by bitcoind. Also note
that doubles can faithfully represent any valid decimal BTC amount (that
is, with 8 d.p. of precision) up to 21 million.
For now, keep the old BtcdClientImpl instance used by RpcService in
place, as the btcdcli4j block notification daemon is dependent upon it
and would also need to be replaced.
Also add unit tests for BitcoindClient which test against sample regtest
responses, using a mock HttpURLConnection.
2021-01-21 10:08:22 +00:00
chimp1984
5d13fdcdbb
Return early
2021-01-14 20:42:36 -05:00
chimp1984
7ba5ab5a4e
Change prio for mailboxMessageList persitence
2021-01-13 20:48:52 -05:00
chimp1984
d434cb3022
Sort persisted mail box messages by age and limit total number.
...
Add size limit.
Add log for number of persisted mailbox msg per day
2021-01-12 22:59:44 -05:00
chimp1984
2fb3bba74d
Use MailboxMessage as param type in sendEncryptedMailboxMessage
2021-01-12 17:47:44 -05:00
chimp1984
3834785828
Bugfix: Add processing of SendersNodeAddressMessage to
...
onBundleOfEnvelopes method.
In case we received a SendersNodeAddressMessage
inside a BundleOfEnvelope we did not set the
peers address.
2021-01-12 17:40:40 -05:00
chimp1984
3e69edeb9e
Remove comment
2021-01-12 17:34:54 -05:00
chimp1984
a21d79ad63
Refactor: rename
2021-01-12 17:34:28 -05:00
chimp1984
364a7f524c
Add toString
2021-01-12 16:14:32 -05:00
chimp1984
2b05ed54fc
Let MailboxMessage extend ExpirablePayload:
...
For all MailboxMessage we want to be sure they have an expire date.
Add getTTL methods and TTL value.
We use 7 days for ChatMessages and 30 days for PrivateNotificationMessages.
All others use default 15 days.
We prefer to keep them explicit and not use a default method in
ExpirablePayload or MailboxMessage.
The value in PrefixedSealedAndSignedMessage will not be used as the
sender use the TTL of the payload and pass that to the MailboxStoragePayload
where we store it in the extraMap. That way we can use different TTL even the
payload message is encrypted and we would not be able to look it up.
2021-01-12 16:14:13 -05:00
chimp1984
46f60260dc
Remove outdated code
...
Remove outdated comment
Add checkNotNull for senderNodeAddress
2021-01-12 15:46:33 -05:00
chimp1984
4c003cded6
Clone reportedPeers to avoid ConcurrentModificationExceptions
2021-01-12 15:33:31 -05:00
chimp1984
5c429bb3a7
Add containsKey check
2021-01-12 14:48:45 -05:00
chimp1984
d353140e7a
Refactor: rename getMyDecryptedMessages method to make it more explicit
...
that its only used for MailboxMsg
2021-01-12 13:54:54 -05:00
chimp1984
575196c16d
Refactor handleDecryptedMessageWithPubKey to use MailboxMessage
...
instead of decryptedMessageWithPubKey.
Here we change a bit the behaviour as now we check also if the
TradeMessage is a MailboxMessage. As that method is only called
from MailboxMessageService domain we never get a non MailboxMessage
here anyway and it would have been a bug.
Remove removeMailboxMsg(DecryptedMessageWithPubKey decryptedMessageWithPubKey) as not used anymore
2021-01-12 13:53:20 -05:00
chimp1984
3875bd85d1
Add removeMailboxMsg with MailboxMessage as argument
2021-01-12 13:24:42 -05:00
chimp1984
337ea89ce6
Add program argument flag republishMailboxEntries
...
Only republish if that flag is set, not depending if its a seedNode
2021-01-12 12:42:50 -05:00
chimp1984
b4ab8a4a0d
Fix incorrect comparison at RemovedPayloadsService.readPersisted
...
Add comments
Cleanups
2021-01-12 10:59:11 -05:00
chimp1984
d39a697611
Fix wrong delay, increase timeout
2021-01-12 10:48:29 -05:00
chimp1984
a9802e60cd
Refactor: return early
2021-01-12 10:48:29 -05:00
chimp1984
8d866d5d06
Improve logs, rename methods, variables
2021-01-12 10:48:29 -05:00
chimp1984
e933bfd281
Add temp. ignore to a failing test.
...
By debugging I could not see why it fails, behaviour seems correct.
I guess its a mock setup issue. Will look into it to fix it soon...
2021-01-12 10:48:28 -05:00
chimp1984
8e0181e528
Add republishExistingProtectedMailboxStorageEntry method
...
Seed nodes republish the persisted mailbox messages after
startup in chunks of 50 items with a 2 minute delay.
Move check for hasSequenceNrIncreased in addProtectedStorageEntry
earlier so we return earlier. This is a very common case for return
if we receive outdated data (like republished mailbox data we have
already received).
Mark logs with ## for easier find/replace for dev testing...
2021-01-12 10:48:28 -05:00
chimp1984
a54813a015
Increase timout for BroadcastHandler to 120 sec
2021-01-12 10:48:28 -05:00
chimp1984
320e5f1aef
Refactor: Rename method
2021-01-12 10:48:28 -05:00
chimp1984
659fe15b8d
Add comment
2021-01-12 10:48:28 -05:00
chimp1984
35ef3b842f
Add support for TTL defined by payload message so we can use
...
different TTL for lower prio mailbox messages like AckMessages.
As we cannot add a field without breaking signatures we
need to use the extraMap in MailboxStoragePayload
2021-01-12 10:48:28 -05:00
chimp1984
7a2501ea1b
Set uid inside constructor
2021-01-12 10:48:28 -05:00
chimp1984
873b557ce8
Add logs
2021-01-12 10:48:28 -05:00
chimp1984
026858d8b1
Refactor: move duplicated method
...
capabilityRequiredAndCapabilityNotSupported to CapabilityUtils
2021-01-12 10:48:27 -05:00
chimp1984
a3b2aad3b0
Refactor: move class to new utils package
2021-01-12 10:48:27 -05:00
chimp1984
de131c83b5
Use MailboxItem value at mailboxItemsByUid instead of a list:
...
The uid is not perfect like a cryptographic hash but it can be
considered safe enough to not have collusion. The list got filled
with duplicates, so should have been a hashSet anyway.
We cannot use the hash as that is not available at the remove method.
We might refactor that in future to get rid of that problematic uid as
key but will require a but more refactoring in the client code as well,
as we do not pass around the outer envelope data but only the decrypted
data.
- Add protectedStorageEntry from persisted mailbox messages to
P2PDataStorage at startup. This ensures that we add those keys to excludedKeys
and that helps to reduce load for seed nodes at initial data response.
- Refactoring at removeFromMapAndDataStore:
- Add trace logs
- Add more comments
2021-01-12 10:48:27 -05:00
chimp1984
9edad02e8f
Use a hashset for listeners
2021-01-12 10:48:27 -05:00
chimp1984
41a92eae7f
Refactor: Rename class
2021-01-12 10:48:27 -05:00
chimp1984
5ba7d78a39
Add RemovedPayloadsStorageService
...
Adjust param
2021-01-12 10:48:27 -05:00
chimp1984
1886b4eb9d
Set addressPrefixHash to empty bytes.
...
We have added the capability in 1.4.0 and have
enforced 1.5.1 so no traders can use that old
version anymore so the capability check is not
needed anymore.
2021-01-12 10:48:27 -05:00
chimp1984
e69a3f646c
Refactor: rename method
2021-01-12 10:48:27 -05:00
chimp1984
75e547fda5
Refactor: move classes to persistence package
2021-01-12 10:48:27 -05:00
chimp1984
32f887478b
Persist map for removed mailbox messages (AddOncePayload more generally)
...
We add the date when we add the hash so that we can remove expired data.
2021-01-12 10:48:26 -05:00
chimp1984
6146362d71
Add onRemoved method to remove mailbox entries once a remove message arrives
...
Add republishMailBoxMessages method
2021-01-12 10:48:26 -05:00
chimp1984
bfbc657c22
Remove old code
2021-01-12 10:48:26 -05:00
chimp1984
5245c205cb
Add filter for isMine at getMyMailBoxMessages
...
Add TODOs
2021-01-12 10:48:26 -05:00
chimp1984
63a0117b4b
Remove nullable return value from decryptProtectedMailboxStorageEntry
...
Remove Objects::nonNull check
Split handleMailboxItem into 2 methods for persisting and
for processing my mailbox msg
2021-01-12 10:48:26 -05:00
chimp1984
79363e7fa8
Refactor: Rename
2021-01-12 10:48:26 -05:00
chimp1984
cf8c93dc5f
Filter expired entries at startup
2021-01-12 10:48:26 -05:00
chimp1984
504fb2e6a1
Refactor: Rename
2021-01-12 10:48:26 -05:00
chimp1984
4c7b56072f
Add new methods, make decryptedMessageWithPubKey nullable
2021-01-12 10:48:25 -05:00
chimp1984
4fc35a7b39
Cleanups
2021-01-12 10:48:25 -05:00
chimp1984
b8fc7f3985
Remove sendEncryptedMailboxMessage from P2PService and use MailboxMessageService instead
2021-01-12 10:48:25 -05:00
chimp1984
33703c269c
Remove removePrivateNotification from P2PService and use MailboxMessageService instead
2021-01-12 10:48:25 -05:00
chimp1984
ee3f158f5f
Remove addDecryptedMailboxListener from P2PService and use MailboxMessageService instead
2021-01-12 10:48:25 -05:00
chimp1984
d470d736ce
Remove getMailBoxMessages from P2PService and use MailboxMessageService instead
2021-01-12 10:48:25 -05:00
chimp1984
a28a2f59df
Move mailbox related code from P2PService to MailboxMessageService
2021-01-12 10:48:25 -05:00
chimp1984
73cfe0bb7d
Make some methods default
2021-01-12 10:48:25 -05:00
chimp1984
0656a52eb9
Refactor: Move mailbox related classed to mailbox package. Make constructor public.
2021-01-12 10:48:24 -05:00
sqrrm
fea52f07a3
Merge pull request #5057 from chimp1984/fix-premature-disconnections-from-seeds
...
Fix premature disconnections from seeds
2021-01-12 12:52:41 +01:00
chimp1984
3f8972bf87
Call init after setting connectionState and connectionStatistics
2021-01-11 22:38:49 -05:00
chimp1984
21eaea0703
Add IgnoredMailboxMap to persist failed decryption
...
attempts and optimize performance by that
2021-01-06 21:20:50 -05:00
chimp1984
8ccfd65c49
Prevent calling shutdown at TorNetworkNode twice.
...
This can happen from the main shut down routine when a timeout gets triggered.
2021-01-06 18:38:21 -05:00
chimp1984
bda9ebe3ca
Change print statistics period to 5 min.
...
remove dev log
2021-01-06 18:09:34 -05:00
chimp1984
e0e14431e4
Add RRT for request / response
2021-01-06 15:45:43 -05:00
chimp1984
4aecd75d4f
Add bytes sent/received to ConnectionStatistics
...
Do check for closed socket after blocking read.
Move throttle code after blocking read.
2021-01-06 14:01:04 -05:00
chimp1984
d8f9581ee8
Ignore test
...
It reports "Wanted but not invoked:" but when debugging
into it it is called. So seems to be some mock setup issue
2021-01-06 12:18:45 -05:00
chimp1984
1dc71c9b3a
Increase delay for reset
...
Improve statistic logging
2021-01-06 11:14:47 -05:00
chimp1984
63a87def20
Add missing stub to mock
2021-01-06 11:05:16 -05:00
chimp1984
14008a670a
Add formatDurationAsWords to Utilities in common
...
to be accessible to the statistics log.
2021-01-06 01:49:38 -05:00
chimp1984
a996754e06
Improve log
2021-01-06 01:11:37 -05:00
chimp1984
082cc33ba4
Fix wrong param in addToMap
...
Also track BundleOfEnvelopes
2021-01-06 01:09:24 -05:00
chimp1984
d13b7e70fa
Add seed node info, add line break
2021-01-06 00:58:40 -05:00
chimp1984
a346db696f
Handle BundleOfEnvelopes in ConnectionState
...
Add ConnectionStatistics
Print statistics of all live connections periodically
2021-01-06 00:18:56 -05:00
chimp1984
347e68004c
Use OS independent double line breaks for better readability
2021-01-05 22:20:09 -05:00
chimp1984
3fa22427c7
Set expectedRequests to 5 in case of fullDaoNode as
...
it does not do the getBlocksRequest.
2021-01-05 22:19:26 -05:00
chimp1984
c7bc7720d8
Add safety filter to removeAnonymousPeers
...
Cleanups
2021-01-05 21:42:19 -05:00
chimp1984
769a78fe52
Behaviour change: Remove setAllowDisconnectSeedNodes method
...
We handle it in ConnectionState by counting
requests and responses and adding a timer
2021-01-05 21:42:18 -05:00
chimp1984
7414df0951
Behaviour change: Remove removeSuperfluousSeedNodes method
...
We handle the connections by INITIAL_DATA_EXCHANGE which
cover the seed nodes as well. Do have an parallel routine
is risky and make things more complex.
2021-01-05 21:41:57 -05:00
chimp1984
34230f43f6
Fix wrong return value for getMaxConnections
2021-01-05 21:21:58 -05:00
chimp1984
5628b7b85c
Refactor:
...
Rename maxConnectionsPeer to outBoundPeerTrigger
Rename maxConnectionsNonDirect to initialDataExchangeTrigger
Update comment
2021-01-05 21:21:17 -05:00
chimp1984
cf4d89dea2
Behaviour change:
...
In the 3rd attempt we filter for
INITIAL_DATA_EXCHANGE peers.
Before we excluded 2 types and as PEER have been
already filtered earlier we would look up for SEED_NODE.
This was only called by non-seedNodes.
2021-01-05 21:10:45 -05:00
chimp1984
4d64fac401
Refactor: Rename lastInitialDataExchangeMessageTimeStamp to lastInitialDataMsgTimeStamp
2021-01-05 21:03:16 -05:00
chimp1984
acad31fa63
Do sorting at candidates stream.
...
At INITIAL_DATA_EXCHANGE we sort
by lastInitialDataExchangeMessageTimeStamp
2021-01-05 21:02:09 -05:00
chimp1984
e1b1781e66
Remove PeerType.SEED_NODE
...
Fix typo
2021-01-05 20:56:04 -05:00
chimp1984
5f977ffe6f
Use isSeedNode
2021-01-05 20:55:29 -05:00
chimp1984
86d0f96c6c
Remove PeerType from Connection. Use ConnectionState instead.
...
Remove unnecessary setPeerType calls. ConnectionState is handling that.
Only PeerManager does the setting of isSeedNode as we do not have the
required dependency in ConnectionState.
2021-01-05 20:50:46 -05:00
chimp1984
0f7a69d1b7
Add ConnectionState class
2021-01-05 20:42:14 -05:00
chimp1984
809484e65d
Refactoring: Rename INITIAL_DATA_REQUEST to INITIAL_DATA_EXCHANGE
2021-01-05 20:40:37 -05:00
chimp1984
15cd42de0c
Add InitialDataRequest and InitialDataResponse marker interface for
...
relevant classes
2021-01-05 20:39:52 -05:00
chimp1984
2c8c9ac519
Add onMessageSent method to MessageListener
2021-01-05 20:36:51 -05:00
chimp1984
f169cf1309
Refactoring: Move PeerType outside of Connection
2021-01-05 20:34:28 -05:00
sqrrm
4da1bb0c10
Merge pull request #5041 from chimp1984/request-only-not-seeds-if-no-seed-available
...
Request only non-seed nodes if no seed nodes are available
2021-01-04 10:50:10 +01:00
chimp1984
77c405530d
Add comment, remove pointless code.
2021-01-03 18:48:07 -05:00
chimp1984
a2d6b52483
In case requests to all seed nodes fail we take
...
persisted and reported peers for requests.
Before we added also the seed nodes which would
delay connection to other nodes a lot.
2021-01-01 20:36:27 -05:00
chimp1984
818c797f97
Refactor sendMessage method: Inline debug value
2021-01-01 16:51:25 -05:00
chimp1984
f57d4e041b
Refactor sendMessage method: Return early
2021-01-01 16:51:25 -05:00
chimp1984
cc433ab57d
Add checks if peer is banned at send msg and InputHandlers
2021-01-01 16:51:24 -05:00
chimp1984
c8bf1d469e
Add support to filter manager for network wide banned nodes
2021-01-01 16:51:24 -05:00
chimp1984
851a44ccb8
Make code more readable
2021-01-01 16:51:05 -05:00
chimp1984
3cf6c60354
Add NetworkFilter, remove BanList
2021-01-01 16:51:05 -05:00
chimp1984
9dfcc01acd
Improve logging of received data
...
The numbers did not match up from delivered response size and items as we did not count
in the overhead of the ProtectedStorageEntry (pub key+sig) and did estimate the size
with taking only first item and multiplying it. A measurement resulted in 20 ms costs
for the exact calculation (toProtoMessage().getSerializedSize() has some costs).
I guess that is acceptable to get correct metrics.
2021-01-01 14:07:17 -05:00
chimp1984
0aeaa5386c
Improve logs, optimize stream
2021-01-01 14:06:16 -05:00
chimp1984
15b8f64d91
Do not shutDown with CloseConnectionReason.PEER_BANNED if we received a
...
CloseConnectionMessage as it would trigger a wrong log on the peers side,
that he got banned.
2021-01-01 14:05:21 -05:00
chimp1984
28dd8404f7
Merge branch 'access-concrete-data-stores' into add-filter-support-on-network-level
2021-01-01 13:50:46 -05:00
sqrrm
d633d13b88
Merge pull request #5032 from chimp1984/check-for-duplicates-at-onBundleOfEnvelopes
...
[1.5.4] Check for duplicate hashes at onBundleOfEnvelopes
2020-12-31 11:52:36 +01:00
sqrrm
4c14d4e232
Merge pull request #5030 from chimp1984/fix-incorrect-map-lookup-forhistorical-data-stores
...
[1.5.4] We need to use the getMapOfAllData method for HistoricalDataStoreServices
2020-12-31 11:28:30 +01:00
chimp1984
35c6a9aca4
Force travis for rebuild
2020-12-31 00:56:21 -05:00
chimp1984
203a6e0681
Force travis for rebuild
2020-12-31 00:44:57 -05:00
chimp1984
b9ca29988f
Check for duplicate hashes at onBundleOfEnvelopes
...
Set log level to debug to not spam logs with it.
2020-12-30 20:56:51 -05:00
chimp1984
6a35410c69
Log error (and throw exception if in devMode) if
...
HistoricalDataStoreService.getMap is called.
HistoricalDataStoreService.getMap should not be used by domain
clients but rather the custom methods getMapOfAllData,
getMapOfLiveData or getMapSinceVersion.
As we have not removed the calls from ProposalService and
other domains we return getMapOfAllData() instead of the live map.
This was prevented earlier for performance reasons. It is more safe
thought to return in case of an illegal access all data instead of
live data only.
2020-12-30 20:47:15 -05:00
chimp1984
4489e57849
Use concrete dataStorageServices instead
...
p2PService.getP2PDataStorage().getAppendOnlyDataStoreMap().
p2PService.getP2PDataStorage().getAppendOnlyDataStoreMap() iterates
over all services including the historical data store service. It used the
getMap method which should not be used at historical data store service as
it is not clear if the live data or all data should be accessed.
2020-12-30 20:38:42 -05:00
chimp1984
85caf88913
We need to use the getMapOfAllData method for HistoricalDataStoreServices
2020-12-30 20:20:57 -05:00
chimp1984
ae65da2861
Revert dev values for NUM_SEEDS_FOR_PRELIMINARY_REQUEST and NUM_ADDITIONAL_SEEDS_FOR_UPDATE_REQUEST
2020-12-30 14:27:33 -05:00
sqrrm
9f50dcae2f
Merge pull request #5026 from chimp1984/add-dos-protection
...
Add dos protection
2020-12-30 12:57:53 +01:00
chimp1984
a6413e4c6f
Filter out AccountAgeWitness data if it appears to be a dos attack or caused from a bug
2020-12-30 06:13:57 -05:00
chimp1984
510a941cb4
Disconnect nodes at RequestDataManager.onMessage < 1.5.1
2020-12-30 06:12:37 -05:00
Christoph Atteneder
aaad74fbf0
Merge pull request #5009 from chimp1984/improve-log-of-initial-data-response
...
Add estimated size to log of initial data response
2020-12-29 20:00:54 +01:00