Commit Graph

16981 Commits

Author SHA1 Message Date
HenrikJannsen
c4dfc2f9ac
Add ExecutorService to TorNetworkNode instead of using pool from base class.
Remove torStartupFuture as it was not needed.
Make executorService private and add shutdownNow call.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:57:19 -05:00
HenrikJannsen
0e34932ec8
Remove createExecutorService method and create executor in constructor instead.
Make executorService protected final

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:53:03 -05:00
HenrikJannsen
553dd84f28
Cleanups
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:49:51 -05:00
HenrikJannsen
43233db70c
Throw RuntimeException at sendMessage.
Make sendMessage package scope to not be used from client code.
Remove stacktrace print.

The caller in NetworkNode would report a onSuccess in the future callback because we do not escalate the exception but only handle it inside handleException.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:47:04 -05:00
HenrikJannsen
f90c4b8f6b
Use cachedThreadPool which uses SynchronousQueue instead of ArrayBlockingQueue.
When ArrayBlockingQueue is used (as in case of using Utilities.getListeningExecutorService) the maxPoolSize
has no effect. The pool creates never more threads than the core pool size.
Thus we have been limited to 15 threads for message sending and connection creation.
This was likely a reason why seed nodes are not accepting new connections if the pool is exhausted.
Slow message send can block a thread for 1-3 minutes.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:33:31 -05:00
HenrikJannsen
071a352443
Remove rejectedExecutionHandler at newCachedThreadPool.
It is more convenient to handle the RejectedExecutionException in the calling code to get more context for error logging.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:33:31 -05:00
HenrikJannsen
84584d38ac
The connection:keep-alive header is restricted in java and would require a jvm option to allow it.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 17:33:30 -05:00
HenrikJannsen
0dc8d0b2bd
Add maxConnection parameter to be used for setting the core pool size of the executor in NetworkNode.
We use double the maxConnection size for the core size and 4x for the max pool size.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 16:35:16 -05:00
HenrikJannsen
d4b6965348
Use networkNode.sendMessage instead of connection.sendMessage as the call on connection is blocking.
This was likely a major bug for seed nodes that at sending hash responses the main thread got blocked.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-13 16:25:39 -05:00
HenrikJannsen
1f40169722
The connection:keep-alive header is restricted in java and would require a jvm option to allow it.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-12 20:23:32 -05:00
dependabot[bot]
f8f920f1c6
Bump actions/setup-java
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 19eeec562b37d29a1ad055b7de9c280bd0906d8d to c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](19eeec562b...c3ac5dd0ed)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 14:03:54 +00:00
Christoph Atteneder
ac575cef5e
Merge pull request #6454 from HenrikJannsen/apply_code_review_suggestions_to_seednode_changes
Apply code review suggestions to seednode changes
2022-12-12 11:26:14 +01:00
HenrikJannsen
f28e3960da
Rename *ValueItem to *ValueReportingItem
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:26:50 -05:00
HenrikJannsen
3ae52dbb52
Add proto to seed node
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:26:08 -05:00
HenrikJannsen
53c031dfaf
Refactor: Move SeedNodeReportingService to reporting package
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:10:33 -05:00
HenrikJannsen
1b10cc22db
Refactor: Move monitor package from core to seedNode and rename to reporting
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:10:02 -05:00
HenrikJannsen
1e32d86b23
Only log errors if shutdown is not in progress.
I want to avoid to risk changes with not calling error handlers/listeners in those cases
as not 100% sure if that could have unintended effects.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:08:40 -05:00
HenrikJannsen
6addd27a33
Add params to newCachedThreadPool method.
Use executor at httpClient builder.
Use httpClient.sendAsync.
Add keep-alive header.
Add RejectedExecutionHandler.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:06:01 -05:00
HenrikJannsen
21c6c52ec8
Make fields final.
Remove setter of key.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 17:02:30 -05:00
Alejandro García
4f34be0a33
Merge pull request #6452 from ripcurlx/update-app-signatures
Update app signatures for v1.9.7
2022-12-11 18:36:00 +02:00
Alejandro García
77afb2d62c
Merge pull request #6450 from jmacxx/dispute_min_payout
Change minimum payout at mediation from 2.5% to 5% of trade amount.
2022-12-11 18:26:56 +02:00
HenrikJannsen
e57af6e8e8
Update mediation popup text
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:19 -05:00
HenrikJannsen
b7d5af18b0
Add MAX_BURN_TARGET_LOWER_FLOOR to avoid cases where small burn amounts lead to deadlock situations.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:19 -05:00
HenrikJannsen
46b2cf914b
Remove DevEnv.isDevTesting
Add check for number of confirmations in devMode to show support button after 5 blocks

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:19 -05:00
HenrikJannsen
e3a0ae9425
Use constants for opReturn data. Rename hash to opReturnData.
Update UI.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:18 -05:00
HenrikJannsen
c8a9b9a7cc
Improve TAC text
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:18 -05:00
HenrikJannsen
65eebefb69
Make copy icon in popups smaller
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:18 -05:00
HenrikJannsen
891685f3ec
Update TAC text and layout
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:18 -05:00
HenrikJannsen
1bb4b55220
Add BurningManAccountingStore resource file.
Use resourceDataStoreService and extend StoreService

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:18 -05:00
HenrikJannsen
a03b0eadfc
Make codacy happy
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:18 -05:00
HenrikJannsen
446762f02c
Add BM account UI 2022-12-11 11:15:17 -05:00
HenrikJannsen
a9bf52d26c
Add BurningMan accounting domain
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:17 -05:00
HenrikJannsen
22c43769bd
Add BurningManAccountingService to CorePersistedDataHost
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:17 -05:00
HenrikJannsen
90550dee3f
Add messages and domain data for accounting domain
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:17 -05:00
HenrikJannsen
d4a0032965
Add new fields and methods
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:17 -05:00
HenrikJannsen
f9db6e0d5c
Add support for multiple clients adding a block handler.
Add requestRawDtoBlock method.
Rename to make different block types more clear.
Change visibility
2022-12-11 11:15:17 -05:00
HenrikJannsen
a551a41e5a
Add support for multiple clients calling the setup method.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:17 -05:00
HenrikJannsen
e2f7c4e103
Make AveragePriceUtil.getAveragePriceTuple mor flexible
Add filter for before date

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
bc9ccfd0e9
Add String formatCoin(long value) API to CoinFormatter
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
2615309931
Add Config options 2022-12-11 11:15:16 -05:00
HenrikJannsen
ff55830405
Add DateUtil and Hex.decodeLast4Bytes
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
adb02428ee
Remove unused var
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
d12c8b5fc4
Remove TODO, rename method
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
97ba1560be
Improve receiver distribution to avoid that legacy BM gets outputs if some outputs fall below the min. amount limit.
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:16 -05:00
HenrikJannsen
fa4c952409
Apply code review feedback
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
eeaafc1e04
Use HashSet instead Lists.
Remove sorting as not needed.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
7cbc5d6263
Increase ISSUANCE_BOOST_FACTOR to 3
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
4ce6ce745a
Add check for isActivated and if not return LEGACY_BURNING_MAN_BTC_FEES_ADDRESS
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
4e08bcd53d
Split up legacy BM into DPT and BTC fee BM
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00
HenrikJannsen
d30ec07d94
Cleanup/add comments
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
2022-12-11 11:15:15 -05:00