CalDescent
f52530b848
More thorough approach to fetchAllTransactionsInvolvingName(), to fix an issue found in unit testing.
2022-02-04 11:58:43 +00:00
CalDescent
c2bf37b878
Added transactionV5Timestamp featureTrigger to unit tests
2022-02-04 11:37:41 +00:00
CalDescent
98a2dd04b8
Fixed bug caused by improper handling of UPDATE_NAME transactions, similar to commit d16663f
.
2022-02-04 10:28:26 +00:00
CalDescent
694ea689c8
Synchronize the loop and break out of it before fetching arbitrary data files. Hopeful fix for ConcurrentModificationException, and maybe a potential deadlock.
2022-02-03 21:14:41 +00:00
CalDescent
618aaaf243
Removed logs used for debugging only
2022-02-03 21:06:36 +00:00
CalDescent
9224ffbf73
Cache transaction list for 2 minutes, and synchronize, to prevent the balance and transactions APIs both requesting at once.
...
This ensures that only a single round of requests (per coin) is used for the wallettransactions and balance APIs. It also speeds up loading on subsequent requests. The 2 minute cache isn't much longer than the foreign block times, so shouldn't cause values to be too out of date.
2022-02-03 21:04:49 +00:00
CalDescent
892612c084
Calculate wallet balances from the transactions (ElectrumX) rather than using bitcoinj.
...
Hopeful fix for incorrect balances in wallets with large numbers of transactions. At the very least, this gives us control of the code that calculates the balance.
2022-02-03 20:22:25 +00:00
CalDescent
077165b807
Modified fetchArbitraryDataFileList() to support requesting only the missing hashes, but it is not yet used.
...
Once GetArbitraryDataFileListMessage is rolled out to the network we can uncomment this code. Needs testnet testing prior to that.
2022-02-03 20:01:44 +00:00
CalDescent
7994fc6407
Rework of onNetworkGetArbitraryDataFileListMessage() to support custom hashes to be optionally supplied.
...
Also simplified the existing logic, to make the code more readable.
2022-02-03 19:58:50 +00:00
CalDescent
d98df3e47d
Added support for file hashes to optionally be included in GetArbitraryDataFileListMessage.
...
Needs testing on testnet, as the majority of nodes need to update before the hashes can be used.
2022-02-03 19:55:22 +00:00
CalDescent
1064b1a08b
Removed duplicate metadata file checks.
2022-02-03 19:53:29 +00:00
CalDescent
0b7a7ed0f1
Added some more debug logging relating to file responses.
2022-02-03 19:52:28 +00:00
CalDescent
114b1aac76
Added arbitrary data file manager thread, which will ensure that all file list responses are tried until we receive the files.
...
Previously we would only try the first response and then discard the others due to being duplicates. They are now added to a queue and retried by the dedicated thread (up to the 60 second timeout).
2022-02-03 19:51:02 +00:00
CalDescent
6d06953a0e
Increased RELAY_REQUEST_MAX_HOPS from 3 to 4, in an attempt to reach more peers.
2022-02-02 22:31:40 +00:00
CalDescent
0430fc8a47
Give up immediately after a synchronization if we are shutting down the synchronizer
2022-02-02 09:18:46 +00:00
CalDescent
7338f5f985
Attempt to acquire a blockchain lock (for up to 5 seconds) before shutting down the repository.
...
This should fix conflicts caused by the synchronizer and controller now being on separate threads. It may also reduce the chances of the database corrupting on shutdown, but this remains to be seen.
2022-02-02 09:17:24 +00:00
CalDescent
640bcdd504
Shutdown/interrupt the synchronizer as early as possible
2022-02-02 09:13:49 +00:00
CalDescent
c9d5d996e5
Increased accuracy of the block weights in the synchronizer logs, as the extra precision is now needed for debugging.
2022-02-01 22:06:01 +00:00
CalDescent
710befec0c
Increased ARBITRARY_RELAY_TIMEOUT from 30 to 60 seconds, so that relay peers remember their mappings for longer.
2022-02-01 22:04:53 +00:00
CalDescent
8ccb158241
Reduce log spam when in DEBUG mode.
2022-02-01 22:04:12 +00:00
CalDescent
97199d9b91
Display the local and total chunk counts on the loading screen.
2022-02-01 22:03:52 +00:00
CalDescent
5a8b895475
Fixed bug in loading screen, which prevented the DOWNLOADING status from showing.
2022-02-01 22:03:17 +00:00
CalDescent
6c9600cda0
Added API key header to GET /arbitrary/resource/status/* endpoints
2022-02-01 22:02:41 +00:00
CalDescent
82fa6a4fd8
Include "localChunkCount" and "totalChunkCount" in the GET /arbitrary/resource/status/* API responses.
...
These values are left out of other API endpoints where multiple resources are returned, because calculating the chunk counts is too time consuming.
2022-02-01 22:02:14 +00:00
CalDescent
45f2d7ab70
Revert "We (currently) can't filter unconfirmed transactions by address, because only the public key is stored in the database until it is confirmed (at which point there is an entry in the TransactionParticipants table which contains the address). Given that this isn't a simple problem to solve, for now it makes sense to reject this combination if requested via the /transactions/search API."
...
This reverts commit 7aed0354f1
.
2022-02-01 21:55:41 +00:00
CalDescent
33731b969a
Direct peer connections now send a file list request to the peer, rather than individually requesting every chunk for a transaction.
2022-02-01 09:04:31 +00:00
CalDescent
40a8cdc71f
Improved logging when fetching data files
2022-01-31 22:35:12 +00:00
CalDescent
cbe83987d8
Fixed occasional ConcurrentModificationException in the block archive reader.
2022-01-31 21:39:49 +00:00
CalDescent
01e4bf3a77
Try to speed up the shutdown process of the cleanup manager.
2022-01-31 21:39:20 +00:00
CalDescent
b198a8ea07
Fixed issue in ArbitraryDataFile.chunkExists() due to it not checking for the metadata file.
2022-01-31 21:38:51 +00:00
CalDescent
e2e87766fa
Moved log from INFO to DEBUG, as now the synchronizer is on its own thread it can occur more often than before.
2022-01-30 20:15:43 +00:00
CalDescent
f005a0975d
Shut down the synchronizer as soon as the controller is stopping, if we are able to.
2022-01-30 20:14:11 +00:00
CalDescent
5700369935
Prioritize syncing over transaction importing.
2022-01-30 20:09:35 +00:00
CalDescent
8a1fb6fe4e
If a lock can't be obtained when synchronizing, automatically request the sync again.
2022-01-30 20:09:09 +00:00
CalDescent
5b788dad2f
Relocated all synchronizer code from the controller to the synchronizer, and also moved synchonization onto its own thread.
2022-01-30 20:01:22 +00:00
CalDescent
fa2bd40d5f
Reduce log spam
2022-01-30 19:51:49 +00:00
CalDescent
074bfadb28
Don't bother locking if there are no new transactions to process
2022-01-30 19:50:09 +00:00
CalDescent
bd60c793be
Incoming transactions are now added to a queue, and then processed soon after.
...
This solves a problem where incoming transactions could rarely obtain a blockchain lock (due to multiple transactions arriving at once) and therefore most messages were thrown away. It was also causing constant blockchain locks to be acquired, which would often prevent the synchronizer from running.
2022-01-30 19:03:31 +00:00
CalDescent
90f3d2568a
Log whenever the synchronizer can't obtain a blockchain lock, so that blockchain lock issues are more easily noticed.
2022-01-30 19:00:28 +00:00
CalDescent
c73cdefe6f
transactionV5Timestamp moved to blockchain.json
2022-01-30 13:47:20 +00:00
CalDescent
c5093168b1
minAccountLevelToMint value moved to blockchain.json
2022-01-29 22:59:04 +00:00
CalDescent
a35e309a2f
minAccountLevelForBlockSubmissions moved to blockchain.json
2022-01-29 22:57:22 +00:00
CalDescent
bb35030112
Merge pull request #65 from QuickMythril/reduce-doge-fee
...
reduce DOGE fees
2022-01-29 20:14:04 +00:00
CalDescent
7aed0354f1
We (currently) can't filter unconfirmed transactions by address, because only the public key is stored in the database until it is confirmed (at which point there is an entry in the TransactionParticipants table which contains the address). Given that this isn't a simple problem to solve, for now it makes sense to reject this combination if requested via the /transactions/search API.
2022-01-29 19:24:28 +00:00
CalDescent
c4f763960c
Don't delete a resource's cache if a build is in progress.
...
Hopeful fix for "Unable to delete cache for resource: Unable to delete directory" error, and possibly some other file conflicts.
2022-01-29 19:18:06 +00:00
CalDescent
c5182a4589
Increased MAX_ACCOUNT_COUNT in GetOnlineAccountsMessage from 1000 to 5000
2022-01-29 12:39:43 +00:00
CalDescent
fc1a376fbd
Added POST /transaction/fee API endpoint, to return the recommended fee for the supplied transaction data.
2022-01-29 10:38:15 +00:00
CalDescent
27387a134f
Fixed typo
2022-01-28 19:58:32 +00:00
CalDescent
be7bb2df9e
Added GET /transaction/unitfee API endpoint, to obtain the unit fee for a transaction type
...
Additional params:
- timestamp: to allow for hard forks. Default: the current time
- level: the account level, to allow for the future possibility of different fees per level. Not currently used.
2022-01-28 19:00:15 +00:00
CalDescent
72a291a54a
Added initial support of different unit fees per transaction type.
...
Included a timestamp property, as this will be needed for each update (hard fork).
2022-01-28 18:50:03 +00:00