Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosted resources search #8

Open
wants to merge 1,597 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1597 commits
Select commit Hold shift + click to select a range
051052f
Removed authentication for GET /peers/summary endpoint
archived-2 Jan 9, 2022
f9749cd
Merge remote-tracking branch 'qortal-data/master' into qdn
archived-2 Jan 9, 2022
8f8a500
Fixed some issues left over from the qortaldata project
archived-2 Jan 10, 2022
e3b45ca
Use an alternative version of Serialization.serializeSizedString() an…
archived-2 Jan 10, 2022
ccde725
Check for an empty string as well as null in a couple of places, so t…
archived-2 Jan 10, 2022
7cf60c7
Updated stop.sh so that it no longer uses the core API.
archived-2 Jan 11, 2022
7658bc2
Added X-API-KEY header field to API documentation endpoints that requ…
archived-2 Jan 11, 2022
89c3236
Updated bundled log4j2.properties files
archived-2 Jan 11, 2022
4e1b0a2
Fixed arbitrary peer tests, which used a local address (but we now tr…
archived-2 Jan 11, 2022
90836af
External IP address updates now require 10 consecutive readings.
archived-2 Jan 12, 2022
e0ebfb9
Reduced log spam.
archived-2 Jan 12, 2022
4815587
Use V2 of string serialization methods in ArbitrarySignaturesMessage,…
archived-2 Jan 12, 2022
f09a131
Added requestHops to log entry.
archived-2 Jan 12, 2022
ade977e
Don't broadcast any arbitrary signatures if the list is empty (i.e. t…
archived-2 Jan 12, 2022
f44c21c
Disallow any kind of website/app/data rendering when localAuthBypassE…
archived-2 Jan 12, 2022
e2b1379
Don't reload the log4j2.properties file as this seems to be buggy in …
archived-2 Jan 12, 2022
777bddd
Revert log4j version for now. We need to put this back in the next up…
archived-2 Jan 12, 2022
2a6244a
Handle multiple qortal processes in stop.sh
archived-2 Jan 12, 2022
6761b91
QDN go-live timestamp set to Fri, 14 Jan 2022 16:00:00 UTC
archived-2 Jan 12, 2022
1277ce3
Bump version to 3.0.0
archived-2 Jan 12, 2022
119c1b4
Use default values for method and compression if not specified.
archived-2 Jan 13, 2022
e257fd8
Updated stop.sh script to use the /admin/stop API endpoint if an apik…
archived-2 Jan 13, 2022
d296029
Bump version to 3.0.1
archived-2 Jan 13, 2022
70c00a4
Updated AdvancedInstaller project for v3.0.1
archived-2 Jan 13, 2022
f05cd9e
Added API key support to qort script
archived-2 Jan 14, 2022
1ddd468
Added API key support to qdata script
archived-2 Jan 14, 2022
1d77101
Use AES/CBC/PKCS5Padding for encryption, and fall back to just AES fo…
archived-2 Jan 15, 2022
5018d27
"Not started" renamed to "Published"
archived-2 Jan 15, 2022
8fb2d38
Revert "Revert log4j version for now. We need to put this back in the…
archived-2 Jan 15, 2022
6f80a6c
Rework of file list requests and relays, allowing it to handle multip…
archived-2 Jan 16, 2022
01c6149
Restrict websites to same origin requests only, using a Content-Secur…
archived-2 Jan 16, 2022
cfc80cb
Use a header instead of a meta tag for Content-Security-Policy, becau…
archived-2 Jan 17, 2022
318f433
Reduced log spam when checking for avatars.
archived-2 Jan 17, 2022
d96bc14
Allow execution of inline scripts, at least for now.
archived-2 Jan 17, 2022
0278f6c
Reduced more log spam
archived-2 Jan 20, 2022
47e763b
Take a copy of the IP address history so it can be safely iterated. W…
archived-2 Jan 20, 2022
c2a4b01
Allow local playback of media files
archived-2 Jan 20, 2022
1b42062
Default minPeerVersion set to 3.0.1
archived-2 Jan 20, 2022
a4ce41e
Updated qort and qdata to check for apikey.txt in $HOME/qortal, which…
archived-2 Jan 20, 2022
e8fabcb
Removed extra isDataLocal() check in GET /hosted/resources which was …
archived-2 Jan 20, 2022
5e1e653
Removed unnecessary database lookups in GET /hosted/resources API
archived-2 Jan 20, 2022
13450d5
Added limit/offset to GET /arbitrary/hosted API endpoints
archived-2 Jan 20, 2022
fcdcc93
Sort hosted data in reverse order (newest first)
archived-2 Jan 20, 2022
54af36f
Remove duplicates in GET /arbitrary/hosted/resources response
archived-2 Jan 20, 2022
85c61c1
Added GET /arbitrary/resources/search API
archived-2 Jan 21, 2022
6e91157
Improved cache clearing process and logging.
archived-2 Jan 21, 2022
6423d5e
Optimized onNetworkGetArbitraryDataFileListMessage() to remove duplic…
archived-2 Jan 21, 2022
8a42dce
Use the first responding peer in the relay map.
archived-2 Jan 21, 2022
f129e16
Added retry mechanism to relay file deletions, just in case it fails …
archived-2 Jan 21, 2022
9f9b7ca
Include "size" in /arbitrary/resource APIs
archived-2 Jan 21, 2022
6f61fbb
Reduced strictness of rate limiter, to allow two additional file list…
archived-2 Jan 21, 2022
ef43e78
Reduced log spam
archived-2 Jan 21, 2022
d105613
Improvements to some /blocks API endpoints
archived-2 Jan 21, 2022
b30445c
Increase MAX_ACCOUNT_COUNT to 5000 (around 0.5MB of data) to see if i…
archived-2 Jan 21, 2022
25efee5
Added networking optimization, to avoid wasted processing on every read.
archived-2 Jan 22, 2022
59346db
Bump version to 3.0.2
archived-2 Jan 22, 2022
a7c0273
Updated approve-auto-update.sh to use new service format
archived-2 Jan 22, 2022
048776e
Ignore failing test due to recent API update, which makes the test in…
archived-2 Jan 22, 2022
6f724f6
Fixed testDirectoryDigest() which has been failing for a couple of ve…
archived-2 Jan 22, 2022
be561a1
Add default "dataPath" to Windows installer builds, so that QDN data …
archived-2 Jan 22, 2022
ea10eec
Fixed bug in auto update process - use the API key when stopping the …
archived-2 Jan 23, 2022
ff6ec83
Removed localAuthBypassEnabled override in unit tests.
archived-2 Jan 23, 2022
6f7c8d9
Removed ApiService instance creation in ApplyUpdate as it wasn't real…
archived-2 Jan 23, 2022
311fe98
Bump version to 3.0.3
archived-2 Jan 23, 2022
244d4f7
New network messages ONLINE_ACCOUNTS_V2 and GET_ONLINE_ACCOUNTS_V2.
catbref Jan 23, 2022
af06774
Clear the cache when deleting data, so that it disappears from the da…
archived-2 Jan 23, 2022
a2b2b63
feat: add Dockerfile
otaku Jan 23, 2022
9daf7a6
Synchronize lists, to prevent an occasional ConcurrentModificationExc…
archived-2 Jan 26, 2022
4e71ae0
Allow QDN data to be served without authentication by setting "qdnAut…
archived-2 Jan 27, 2022
3303e41
Fixed unhandled case in GET /arbitrary/{service}/{name}* endpoints
archived-2 Jan 27, 2022
344704b
MIN_LEVEL_FOR_BLOCK_SUBMISSION temporarily increased to 6.
archived-2 Jan 27, 2022
a0ba016
Fixed case sensitive ordering issue in websites list.
archived-2 Jan 27, 2022
7808a15
Fixed case sensitive ordering issues in other aspects of QDN.
archived-2 Jan 27, 2022
e5c12b1
Bump version to 3.0.4
archived-2 Jan 27, 2022
a0ed3f5
Merge branch 'master' of github.com:Qortal/qortal
archived-2 Jan 27, 2022
d200a09
Updated AdvancedInstaller project for v3.0.4
archived-2 Jan 27, 2022
cdd5719
Use getEffectiveMintingLevel() rather than getLevel()
archived-2 Jan 28, 2022
b1342d8
Updated potentially misleading log message.
archived-2 Jan 28, 2022
72a291a
Added initial support of different unit fees per transaction type.
archived-2 Jan 28, 2022
be7bb2d
Added GET /transaction/unitfee API endpoint, to obtain the unit fee f…
archived-2 Jan 28, 2022
27387a1
Fixed typo
archived-2 Jan 28, 2022
fc1a376
Added POST /transaction/fee API endpoint, to return the recommended f…
archived-2 Jan 29, 2022
c5182a4
Increased MAX_ACCOUNT_COUNT in GetOnlineAccountsMessage from 1000 to …
archived-2 Jan 29, 2022
c4f7639
Don't delete a resource's cache if a build is in progress.
archived-2 Jan 29, 2022
7aed035
We (currently) can't filter unconfirmed transactions by address, beca…
archived-2 Jan 29, 2022
bb35030
Merge pull request #65 from QuickMythril/reduce-doge-fee
archived-2 Jan 29, 2022
d4d73fc
Merge pull request #67 from otaku/docker
archived-2 Jan 29, 2022
d4ff7bb
Fixed inaccurate README text that was accidentally merged from the da…
archived-2 Jan 29, 2022
a35e309
minAccountLevelForBlockSubmissions moved to blockchain.json
archived-2 Jan 29, 2022
c509316
minAccountLevelToMint value moved to blockchain.json
archived-2 Jan 29, 2022
c73cdef
transactionV5Timestamp moved to blockchain.json
archived-2 Jan 30, 2022
90f3d25
Log whenever the synchronizer can't obtain a blockchain lock, so that…
archived-2 Jan 30, 2022
bd60c79
Incoming transactions are now added to a queue, and then processed so…
archived-2 Jan 30, 2022
074bfad
Don't bother locking if there are no new transactions to process
archived-2 Jan 30, 2022
fa2bd40
Reduce log spam
archived-2 Jan 30, 2022
5b788da
Relocated all synchronizer code from the controller to the synchroniz…
archived-2 Jan 30, 2022
8a1fb6f
If a lock can't be obtained when synchronizing, automatically request…
archived-2 Jan 30, 2022
5700369
Prioritize syncing over transaction importing.
archived-2 Jan 30, 2022
f005a09
Shut down the synchronizer as soon as the controller is stopping, if …
archived-2 Jan 30, 2022
e2e8776
Moved log from INFO to DEBUG, as now the synchronizer is on its own t…
archived-2 Jan 30, 2022
b198a8e
Fixed issue in ArbitraryDataFile.chunkExists() due to it not checking…
archived-2 Jan 31, 2022
01e4bf3
Try to speed up the shutdown process of the cleanup manager.
archived-2 Jan 31, 2022
cbe8398
Fixed occasional ConcurrentModificationException in the block archive…
archived-2 Jan 31, 2022
40a8cdc
Improved logging when fetching data files
archived-2 Jan 31, 2022
33731b9
Direct peer connections now send a file list request to the peer, rat…
archived-2 Feb 1, 2022
45f2d7a
Revert "We (currently) can't filter unconfirmed transactions by addre…
archived-2 Feb 1, 2022
82fa6a4
Include "localChunkCount" and "totalChunkCount" in the GET /arbitrary…
archived-2 Feb 1, 2022
6c9600c
Added API key header to GET /arbitrary/resource/status/* endpoints
archived-2 Feb 1, 2022
5a8b895
Fixed bug in loading screen, which prevented the DOWNLOADING status f…
archived-2 Feb 1, 2022
97199d9
Display the local and total chunk counts on the loading screen.
archived-2 Feb 1, 2022
8ccb158
Reduce log spam when in DEBUG mode.
archived-2 Feb 1, 2022
710befe
Increased ARBITRARY_RELAY_TIMEOUT from 30 to 60 seconds, so that rela…
archived-2 Feb 1, 2022
c9d5d99
Increased accuracy of the block weights in the synchronizer logs, as …
archived-2 Feb 1, 2022
640bcdd
Shutdown/interrupt the synchronizer as early as possible
archived-2 Feb 2, 2022
7338f5f
Attempt to acquire a blockchain lock (for up to 5 seconds) before shu…
archived-2 Feb 2, 2022
0430fc8
Give up immediately after a synchronization if we are shutting down t…
archived-2 Feb 2, 2022
6d06953
Increased RELAY_REQUEST_MAX_HOPS from 3 to 4, in an attempt to reach …
archived-2 Feb 2, 2022
114b1aa
Added arbitrary data file manager thread, which will ensure that all …
archived-2 Feb 3, 2022
0b7a7ed
Added some more debug logging relating to file responses.
archived-2 Feb 3, 2022
1064b1a
Removed duplicate metadata file checks.
archived-2 Feb 3, 2022
d98df3e
Added support for file hashes to optionally be included in GetArbitra…
archived-2 Feb 3, 2022
7994fc6
Rework of onNetworkGetArbitraryDataFileListMessage() to support custo…
archived-2 Feb 3, 2022
077165b
Modified fetchArbitraryDataFileList() to support requesting only the …
archived-2 Feb 3, 2022
892612c
Calculate wallet balances from the transactions (ElectrumX) rather th…
archived-2 Feb 3, 2022
9224ffb
Cache transaction list for 2 minutes, and synchronize, to prevent the…
archived-2 Feb 3, 2022
618aaaf
Removed logs used for debugging only
archived-2 Feb 3, 2022
694ea68
Synchronize the loop and break out of it before fetching arbitrary da…
archived-2 Feb 3, 2022
98a2dd0
Fixed bug caused by improper handling of UPDATE_NAME transactions, si…
archived-2 Feb 4, 2022
c2bf37b
Added transactionV5Timestamp featureTrigger to unit tests
archived-2 Feb 4, 2022
f52530b
More thorough approach to fetchAllTransactionsInvolvingName(), to fix…
archived-2 Feb 4, 2022
756d5e6
Added naming tests for blank new names
archived-2 Feb 4, 2022
4e59eb8
Added unit test to simulate the false association between previous a …
archived-2 Feb 4, 2022
6dec65c
Rewrite of fetchAllTransactionsInvolvingName() to avoid having to loa…
archived-2 Feb 4, 2022
23bafb6
Removed unused methods
archived-2 Feb 4, 2022
9e571b8
Yet another rewrite of fetchAllTransactionsInvolvingName() - this tim…
archived-2 Feb 4, 2022
0cf2f7f
Missing import from last commit
archived-2 Feb 4, 2022
3fbb86f
Added indexes, to make looking up name transactions by name around 5x…
archived-2 Feb 4, 2022
8937b3e
Don't allow duplicate transaction in the incoming transactions queue.
archived-2 Feb 5, 2022
775e3c0
Invalidate ElectrumX transactions cache when switching accounts.
archived-2 Feb 5, 2022
c640534
minAccountLevelForBlockSubmissions reduced from 6 to 5
archived-2 Feb 5, 2022
76df332
Check for null IP address before notifying of an external IP update.
archived-2 Feb 5, 2022
9692539
Don't include fee in balance calculation (it looks like it could be d…
archived-2 Feb 5, 2022
98831a9
Break out of the various loops in the cleanup manager if the thread i…
archived-2 Feb 5, 2022
ba41d84
Initial attempt to avoid an unnecessary block submission if one of ou…
archived-2 Jan 26, 2022
cbf03d5
Made synchronizer method public as it is now also used by the block m…
archived-2 Jan 26, 2022
472e1da
Added debug level logging in higherWeightChainExists() for better vis…
archived-2 Jan 26, 2022
170244e
More work on higher weight chain detection in the block minter.
archived-2 Jan 30, 2022
60d7186
Allow 3 seconds for the synchronizer to obtain a blockchain lock, to …
archived-2 Jan 30, 2022
483e754
Revert "Moved log from INFO to DEBUG, as now the synchronizer is on i…
archived-2 Jan 30, 2022
816b01c
Fixed issue in rebase
archived-2 Jan 30, 2022
a4cbbb3
Moved block minter sleep to later in the process, otherwise it can re…
archived-2 Jan 30, 2022
55b5702
Invalidate last low weight block signature whenever the previous bloc…
archived-2 Jan 30, 2022
0fe2f22
Added invalidUnconfirmedTransactions map
archived-2 Feb 6, 2022
8c03164
Don't add expired transactions to invalidUnconfirmedTransactions, as …
archived-2 Feb 6, 2022
08e06ba
Fixed bugs preventing invalidUnconfirmedTransactions from working as …
archived-2 Feb 6, 2022
cfe0414
Small rework of invalidUnconfirmedTransactions to specify the expiry …
archived-2 Feb 6, 2022
3c526db
Fixed bug in build manager which would prevent future builds until th…
archived-2 Feb 6, 2022
2740543
Added "async" and "attempts" parameters to GET /arbitrary/{service}/{…
archived-2 Feb 6, 2022
b8aaf14
Introduced ArbitraryDataFileRequestThread to allow for multiple concu…
archived-2 Feb 6, 2022
ef83862
Stop asking for hashes from a peer if one fails.
archived-2 Feb 6, 2022
fa447cc
Builder thread updates.
archived-2 Feb 6, 2022
9ec4e24
Slightly optimized logic in fetchArbitraryDataFiles()
archived-2 Feb 6, 2022
cd5ce6d
Don't remove from the relay map after a file is requested, as it may …
archived-2 Feb 6, 2022
84e4f9a
Rework of arbitraryRelayMap to keep track of multiple responses.
archived-2 Feb 6, 2022
3e0306f
Increased minPeerConnectionTime and maxPeerConnectionTime to reduce t…
archived-2 Feb 6, 2022
99f6bb5
Reorganized some controller methods.
archived-2 Feb 6, 2022
41c4e0c
Merge branch 'master' into block-minter-updates
archived-2 Feb 6, 2022
f8ffb1a
Updated thread names
archived-2 Feb 7, 2022
133943c
Reduce log spam
archived-2 Feb 7, 2022
b6d633a
Break out of incoming transactions processing loop if we need to sync.
archived-2 Feb 7, 2022
a49218a
Optimized ArbitraryDataFileRequestThread - only start a database tran…
archived-2 Feb 7, 2022
ab4ba9b
Don't re-fetch unconfirmed transactions that are already in the queue
archived-2 Feb 8, 2022
0a88a0c
Perform the base58 decoding outside of the arbitraryDataFileHashRespo…
archived-2 Feb 8, 2022
b72153f
Renamed main thread from "Controller" to "Qortal"
archived-2 Feb 8, 2022
9630625
Rework of processIncomingTransactionsQueue() so that it no longer hol…
archived-2 Feb 8, 2022
d1f24d4
Added defensiveness in convertToSimpleTransaction()
archived-2 Feb 8, 2022
9804ecc
Removed transaction caching. Can be reintroduced later.
archived-2 Feb 8, 2022
70c864b
Removed getWalletTransactions() synchronization. Again, can be re-add…
archived-2 Feb 8, 2022
d7658ee
Try a lookahead size of 20 (instead of 3) when asking Bitcoinj for th…
archived-2 Feb 8, 2022
214f49e
Revert "Calculate wallet balances from the transactions (ElectrumX) r…
archived-2 Feb 8, 2022
de5f31a
Don't process file hashes if we're stopping
archived-2 Feb 9, 2022
b0f19f8
Merge branch 'block-minter-updates'
archived-2 Feb 9, 2022
b782679
Revert "Revert "Calculate wallet balances from the transactions (Elec…
archived-2 Feb 9, 2022
dda2316
Revert "Try a lookahead size of 20 (instead of 3) when asking Bitcoin…
archived-2 Feb 9, 2022
b7b66f6
Revert "Removed getWalletTransactions() synchronization. Again, can b…
archived-2 Feb 9, 2022
61f5817
Revert "Removed transaction caching. Can be reintroduced later."
archived-2 Feb 9, 2022
06b5b8f
Reduced time between processing build tasks, to prevent builds with i…
archived-2 Feb 9, 2022
2637311
Prevent potential ConcurrentModificationException in the build queue
archived-2 Feb 9, 2022
a8c79b8
Discard any uncommitted changes as a result of the higher weight chai…
archived-2 Feb 10, 2022
9332d72
Fixed bug in cache clearing logic, which was often preventing resourc…
archived-2 Feb 10, 2022
c0c50f2
Updated bootstrap hosts
archived-2 Feb 11, 2022
fc82f0b
Use 5 builder threads, so that one slow resource (e.g. a thumbnail) d…
archived-2 Feb 11, 2022
2343e73
Handle case where a file cannot be unzipped.
archived-2 Feb 11, 2022
6932fb9
Added "priority" property to build queue items.
archived-2 Feb 11, 2022
f7341cd
Increased /arbitrary priority to 1
archived-2 Feb 11, 2022
49b307d
Treat a null priority as 0
archived-2 Feb 11, 2022
a6aabaa
Reduce build queue log spam by only logging high priority items (5 an…
archived-2 Feb 11, 2022
ee1f072
Improvement to last commit, so that caller class names are preserved.
archived-2 Feb 11, 2022
a664a6a
Added more LTC Electrum peers from https://1209k.com/bitcoin-eye/ele.…
archived-2 Feb 11, 2022
dbacfb9
Increased TX_CACHE_SIZE from 200 to 1000, to speed up loading times o…
archived-2 Feb 11, 2022
9b43e4e
Time electrum requests, and move on to another server if one takes mo…
archived-2 Feb 11, 2022
8ac298e
Allow 3 retries for getTransaction() and getAddressTransactions() req…
archived-2 Feb 11, 2022
19c83cc
MAX_AVG_RESPONSE_TIME reduced to 500, as one peer regularly takes aro…
archived-2 Feb 11, 2022
3ae2f00
Removed unusably slow electrum peer
archived-2 Feb 11, 2022
58a690e
Route through new getAddressTransactions() wrapper.
archived-2 Feb 11, 2022
ea42a56
Fixed ElectrumX log spam and errors
archived-2 Feb 13, 2022
0712259
Implemented REGISTER_NAME transaction fee increase from 0.001 to 5 QO…
archived-2 Feb 13, 2022
c1598d2
Name registration fee increase timestamp set to Sunday, 20 February 2…
archived-2 Feb 13, 2022
265ae19
Fixed other failing tests due to increased REGISTER_NAME transaction …
archived-2 Feb 13, 2022
8321380
Use the timestamp from the registerNameTransactionData in unit tests,…
archived-2 Feb 13, 2022
58f1148
Bump version to 3.1.0
archived-2 Feb 13, 2022
538ac30
Request only the missing hashes, not all of them.
archived-2 Feb 14, 2022
43791f0
Wait 2 minutes on node startup before trying to fetch followed QDN data.
archived-2 Feb 14, 2022
6c1c814
Updated AdvancedInstaller project for v3.1.0
archived-2 Feb 14, 2022
fd0a6ec
Fix for invalid balance (and transaction amount) when there are no ou…
archived-2 Feb 14, 2022
6275ac2
Increased numberOfAdditionalBatchesToSearch from 5 to 7.
archived-2 Feb 14, 2022
6ee395e
Stop bulk arbitrary signature broadcasts, as they were creating a lot…
archived-2 Feb 15, 2022
c90c287
Increased ARBITRARY_REQUEST_TIMEOUT from 10 to 12 seconds, as some we…
archived-2 Feb 15, 2022
85b3278
Don't throttle the arbitrary data file request threads when there are…
archived-2 Feb 15, 2022
6054982
Bump version to 3.1.1
archived-2 Feb 15, 2022
d1a7e73
Updated AdvancedInstaller project for v3.1.1
archived-2 Feb 15, 2022
c90c3a1
Block peers below 3.1.0
archived-2 Feb 18, 2022
3e50548
Default minPeerVersion also increased to 3.1.0
archived-2 Feb 18, 2022
464ce66
Moved deletion retry code into ArbitraryDataFile
archived-2 Feb 18, 2022
67ca876
Log if we're unable to process the received file.
archived-2 Feb 18, 2022
becb0b3
Merge branch 'master' into network-online-accounts-v2
archived-2 Feb 18, 2022
17a9b4e
Merge pull request #66 from catbref/network-online-accounts-v2
archived-2 Feb 18, 2022
5aac2dc
ONLINE_ACCOUNTS_V2_PEER_VERSION set to 3.2.0
archived-2 Feb 18, 2022
fcdd85a
Try a lookahead size of 20 (instead of 3) when asking Bitcoinj for th…
archived-2 Feb 8, 2022
35b0a85
Increased WALLET_KEY_LOOKAHEAD_INCREMENT_BITCOINJ to 50
archived-2 Feb 18, 2022
5842b12
Add WaifUPnP-1.1 jar to project.
archived-2 Feb 18, 2022
8de6065
Attempt to open the listen port (default 12392) using UPnP, if the lo…
archived-2 Feb 18, 2022
6d0db7c
Catch UncheckedIOException in findAllHostedPaths() which was seen whe…
archived-2 Feb 19, 2022
5d419dd
Handle case where funds are sent to and from the same bitcoiny determ…
archived-2 Feb 19, 2022
7307844
If UPnP is disabled in settings, close the existing external listenPo…
archived-2 Feb 20, 2022
21b4b49
Renamed method.
archived-2 Feb 20, 2022
f4f7cc5
Removed unused import.
archived-2 Feb 20, 2022
146e797
Synchronize this.allKnownPeers and this.connectedPeers in Network.req…
archived-2 Feb 20, 2022
7798b8d
Keep items in arbitraryDataFileHashResponses if they are currently be…
archived-2 Feb 20, 2022
e07adbd
online accounts api call, fix level zero accounts
protoniuman Feb 21, 2022
6b83927
Persist MintingAccounts.json on minting accounts add/remove
protoniuman Feb 21, 2022
8d7be77
Fixed incorrectly named tag.
archived-2 Feb 21, 2022
8673c7e
Fixed bug in GET /peers/summary API
archived-2 Feb 21, 2022
a2c462b
Add <meta charset="UTF-8"> tag to websites. Fixed issue rendering emo…
archived-2 Feb 21, 2022
d5c3921
Only show the red "synchronizing" systray icon if the latest block is…
archived-2 Feb 21, 2022
a3753c0
Add search functionality to hosted resources
protoniuman Feb 22, 2022
782904a
improvement to the search on hosted resources
protoniuman Feb 22, 2022
c65a63f
Fixed "query" parameter error in swagger documentation
archived-2 Feb 26, 2022
badb576
Fixed exception when identifier is null. Also handling null names as …
archived-2 Feb 26, 2022
7740f3d
Small formatting tweaks, for consistency with existing code.
archived-2 Feb 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions .github/workflows/pr-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PR testing

on:
pull_request:
branches: [ master ]

jobs:
mavenTesting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up the Java JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Run all tests
run: |
mvn -B clean test -DskipTests=false --file pom.xml
if [ -f "target/site/jacoco/index.html" ]; then echo "Total coverage: $(cat target/site/jacoco/index.html | grep -o 'Total[^%]*%' | grep -o '[0-9]*%')"; fi

- name: Log coverage percentage
run: |
if [ ! -f "target/site/jacoco/index.html" ]; then echo "No coverage information available"; fi
if [ -f "target/site/jacoco/index.html" ]; then echo "Total coverage: $(cat target/site/jacoco/index.html | grep -o 'Total[^%]*%' | grep -o '[0-9]*%')"; fi
19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/db*
/lists/
/bin/
/target/
/qortal-backup/
/log.txt.*
/arbitrary*
/Qortal-BTC*
Expand All @@ -14,5 +16,18 @@
/settings.json
/testnet*
/settings*.json
/testchain.json
/run-testnet.sh
/testchain*.json
/run-testnet*.sh
/.idea
/qortal.iml
.DS_Store
/src/main/resources/resources
/*.jar
/run.pid
/run.log
/WindowsInstaller/Install Files/qortal.jar
/*.7z
/tmp
/data*
/src/test/resources/arbitrary/*/.qortal/cache
apikey.txt
29 changes: 26 additions & 3 deletions AutoUpdates.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Auto Updates

## TL;DR: how-to

* Prepare new release version (see way below for details)
* Assuming you are in git 'master' branch, at HEAD
* Shutdown local node if running
* Build auto-update download: `tools/build-auto-update.sh` - uploads auto-update file into new git branch
* Restart local node
* Publish auto-update transaction using *private key* for **non-admin** member of "dev" group:
`tools/publish-auto-update.sh non-admin-dev-member-private-key-in-base58`
* Wait for auto-update `ARBITRARY` transaction to be confirmed into a block
* Have "dev" group admins 'approve' auto-update using `tools/approve-auto-update.sh`
This tool will prompt for *private key* of **admin** of "dev" group
* A minimum number of admins are required for approval, and a minimum number of blocks must pass also.
* Nodes will start to download, and apply, the update over the next 20 minutes or so (see CHECK_INTERVAL in AutoUpdate.java)

## Theory
* Using a specific git commit (e.g. abcdef123) we produce a determinstic JAR with consistent hash.
* To avoid issues with over-eager anti-virus / firewalls we obfuscate JAR using very simplistic XOR-based method.
Expand All @@ -25,8 +40,8 @@ The same method is used to obfuscate and de-obfuscate:

## Typical download locations
The git SHA1 commit hash is used to replace `%s` in various download locations, e.g.:
* https://github.com/QORT/qortal/raw/%s/qortal.update
* https://[email protected]/QORT/qortal/%s/qortal.update
* https://github.com/Qortal/qortal/raw/%s/qortal.update
* https://[email protected]/Qortal/qortal/%s/qortal.update

These locations are part of the org.qortal.settings.Settings class and can be overriden in settings.json like:
```
Expand All @@ -45,4 +60,12 @@ $ java -cp qortal.jar org.qortal.XorUpdate
usage: XorUpdate <input-file> <output-file>
$ java -cp qortal.jar org.qortal.XorUpdate qortal.jar qortal.update
$
```
```

## Preparing new release version

* Shutdown local node
* Modify `pom.xml` and increase version inside `<version>` tag
* Commit new `pom.xml` and push to github, e.g. `git commit -m 'Bumped to v1.4.2' -- pom.xml; git push`
* Tag this new commit with same version: `git tag v1.4.2`
* Push tag up to github: `git push origin v1.4.2`
12 changes: 9 additions & 3 deletions DATABASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ You can examine your node's database using [HSQLDB's "sqltool"](http://www.hsqld
It's a good idea to install "rlwrap" (ReadLine wrapper) too as sqltool doesn't support command history/editing.

Typical command line for sqltool would be:
`rlwrap java -cp ${HSQLDB_JAR}:${SQLTOOL_JAR} org.hsqldb.cmdline.SqlTool --rcFile=${SQLTOOL_RC} qora`
`rlwrap java -cp ${HSQLDB_JAR}:${SQLTOOL_JAR} org.hsqldb.cmdline.SqlTool --rcFile=${SQLTOOL_RC} qortal`

`${HSQLDB_JAR}` should be set with pathname where Maven downloaded hsqldb,
typically `${HOME}/.m2/repository/org/hsqldb/hsqldb/2.5.0/hsqldb-2.5.0.jar`
typically `${HOME}/.m2/repository/org/hsqldb/hsqldb/2.5.1/hsqldb-2.5.1.jar`

`${SQLTOOL_JAR}` should be set with pathname where Maven downloaded sqltool,
typically `${HOME}/.m2/repository/org/hsqldb/sqltool/2.5.0/sqltool-2.5.0.jar`
Expand All @@ -25,10 +25,16 @@ Above `url` component `file:db/blockchain` assumes you will call `sqltool` from

Another idea is to assign a shell alias in your `.bashrc` like:
```
export HSQLDB_JAR=${HOME}/.m2/repository/org/hsqldb/hsqldb/2.5.0/hsqldb-2.5.0.jar
export HSQLDB_JAR=${HOME}/.m2/repository/org/hsqldb/hsqldb/2.5.1/hsqldb-2.5.1.jar
export SQLTOOL_JAR=${HOME}/.m2/repository/org/hsqldb/sqltool/2.5.0/sqltool-2.5.0.jar
alias sqltool='rlwrap java -cp ${HSQLDB_JAR}:${SQLTOOL_JAR} org.hsqldb.cmdline.SqlTool --rcFile=${SQLTOOL_RC}'
```
So you can simply type: `sqltool qortal`

Don't forget to use `SHUTDOWN;` before exiting sqltool so that database files are closed cleanly.

## Quick and dirty version

With `sqltool-2.5.0.jar` and `qortal.jar` in current directory, and database in `db/`

`java -cp qortal.jar:sqltool-2.5.0.jar org.hsqldb.cmdline.SqlTool --inlineRc=url=jdbc:hsqldb:file:db/blockchain`
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM maven:3-openjdk-11 as builder

WORKDIR /work
COPY ./ /work/
RUN mvn clean package

###
FROM openjdk:11

RUN useradd -r -u 1000 -g users qortal && \
mkdir /usr/local/qortal /qortal && \
chown 1000:100 /qortal

COPY --from=builder /work/log4j2.properties /usr/local/qortal/
COPY --from=builder /work/target/qortal*.jar /usr/local/qortal/qortal.jar

USER 1000:100

EXPOSE 12391 12392
HEALTHCHECK --start-period=5m CMD curl -sf http://127.0.0.1:12391/admin/info || exit 1

WORKDIR /qortal
VOLUME /qortal

ENTRYPOINT ["java"]
CMD ["-Djava.net.preferIPv4Stack=false", "-jar", "/usr/local/qortal/qortal.jar"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
- Create basic *settings.json* file: `echo '{}' > settings.json`
- Run JAR in same working directory as *settings.json*: `java -jar target/qortal-1.0.jar`
- Wrap in shell script, add JVM flags, redirection, backgrounding, etc. as necessary.
- Or use supplied example shell script: *run.sh*
- Or use supplied example shell script: *start.sh*
69 changes: 69 additions & 0 deletions TestNets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# How to build a testnet

## Create testnet blockchain config

- You can begin by copying the mainnet blockchain config `src/main/resources/blockchain.json`
- Insert `"isTestChain": true,` after the opening `{`
- Modify testnet genesis block

### Testnet genesis block

- Set `timestamp` to a nearby future value, e.g. 15 mins from 'now'
This is to give yourself enough time to set up other testnet nodes
- Retain the initial `ISSUE_ASSET` transactions!
- Add `ACCOUNT_FLAGS` transactions with `"andMask": -1, "orMask": 1, "xorMask": 0` to create founders
- Add at least one `REWARD_SHARE` transaction otherwise no-one can mint initial blocks!
You will need to calculate `rewardSharePublicKey` (and private key),
or make a new account on mainnet and use self-share key values
- Add `ACCOUNT_LEVEL` transactions to set initial level of accounts as needed
- Add `GENESIS` transactions to add QORT/LEGACY_QORA funds to accounts as needed

## Testnet `settings.json`

- Create a new `settings-test.json`
- Make sure to add `"isTestNet": true,`
- Make sure to reference testnet blockchain config file: `"blockchainConfig": "testchain.json",`
- It is a good idea to use a separate database: `"repositoryPath": "db-testnet",`
- You might also need to add `"bitcoinNet": "TEST3",` and `"litecoinNet": "TEST3",`

## Other nodes

- Copy `testchain.json` and `settings-test.json` to other nodes
- Alternatively, you can run multiple nodes on the same machine by:
* Copying `settings-test.json` to `settings-test-1.json`
* Configure different `repositoryPath`
* Configure use of different ports:
+ `"apiPort": 22391,`
+ `"listenPort": 22392,`

## Starting-up

- Start up at least as many nodes as `minBlockchainPeers` (or adjust this value instead)
- Probably best to perform API call `DELETE /peers/known`
- Add other nodes via API call `POST /peers <peer-hostname-or-IP>`
- Add minting private key to node(s) via API call `POST /admin/mintingaccounts <minting-private-key>`
This key must have corresponding `REWARD_SHARE` transaction in testnet genesis block
- Wait for genesis block timestamp to pass
- A node should mint block 2 approximately 60 seconds after genesis block timestamp
- Other testnet nodes will sync *as long as there is at least `minBlockchainPeers` peers with an "up-to-date" chain`
- You can also use API call `POST /admin/forcesync <connected-peer-IP-and-port>` on stuck nodes

## Dealing with stuck chain

Maybe your nodes have been offline and no-one has minted a recent testnet block.
Your options are:

- Start a new testnet from scratch
- Fire up your testnet node(s)
- Force one of your nodes to mint by:
+ Set a debugger breakpoint on Settings.getMinBlockchainPeers()
+ When breakpoint is hit, change `this.minBlockchainPeers` to zero, then continue
- Once one of your nodes has minted blocks up to 'now', you can use "forcesync" on the other nodes

## Tools

- `qort` tool, but use `-t` option for default testnet API port (62391)
- `qort` tool, but first set shell variable: `export BASE_URL=some-node-hostname-or-ip:port`
- `qort` tool, but prepend with one-time shell variable: `BASE_URL=some-node-hostname-or-ip:port qort ......`
- `peer-heights`, but use `-t` option, or `BASE_URL` shell variable as above

3 changes: 3 additions & 0 deletions WindowsInstaller/Install Files/AppData/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"apiDocumentationEnabled": true
}
70 changes: 70 additions & 0 deletions WindowsInstaller/Install Files/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
rootLogger.level = info
# On Windows, uncomment next line to set dirname:
# property.dirname = ${sys:user.home}\\AppData\\Local\\qortal\\
property.filename = ${sys:log4j2.filenameTemplate:-log.txt}

rootLogger.appenderRef.console.ref = stdout
rootLogger.appenderRef.rolling.ref = FILE

# Suppress extraneous bitcoinj library output
logger.bitcoinj.name = org.bitcoinj
logger.bitcoinj.level = error

# Override HSQLDB logging level to "warn" as too much is logged at "info"
logger.hsqldb.name = hsqldb.db
logger.hsqldb.level = warn

# Support optional, per-session HSQLDB debugging
logger.hsqldbRepository.name = org.qortal.repository.hsqldb
logger.hsqldbRepository.level = debug

# Suppress extraneous Jersey warning
logger.jerseyInject.name = org.glassfish.jersey.internal.inject.Providers
logger.jerseyInject.level = off

# Suppress extraneous Jersey EOF 'errors' (actually remote peers disconnecting early)
logger.jerseyEOF.name = org.glassfish.jersey.server.internal
logger.jerseyEOF.level = off

# Suppress extraneous Jetty entries
# 2019-02-14 11:46:27 INFO ContextHandler:851 - Started o.e.j.s.ServletContextHandler@6949e948{/,null,AVAILABLE}
# 2019-02-14 11:46:27 INFO AbstractConnector:289 - Started ServerConnector@50ad322b{HTTP/1.1,[http/1.1]}{0.0.0.0:9085}
# 2019-02-14 11:46:27 INFO Server:374 - jetty-9.4.11.v20180605; built: 2018-06-05T18:24:03.829Z; git: d5fc0523cfa96bfebfbda19606cad384d772f04c; jvm 1.8.0_181-b13
# 2019-02-14 11:46:27 INFO Server:411 - Started @2539ms
logger.jetty.name = org.eclipse.jetty
logger.jetty.level = warn
# Even more extraneous Jetty output
# 2019-01-26 02:18:10 WARN ResourceService:718 - java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
logger.jettyRS.name = org.eclipse.jetty.server.ResourceService
logger.jettyRS.level = error

# Suppress extraneous slf4j entries
# 2019-02-14 11:46:27 INFO log:193 - Logging initialized @1636ms to org.eclipse.jetty.util.log.Slf4jLog
logger.slf4j.name = org.slf4j
logger.slf4j.level = warn

# Suppress extraneous Reflections entry
# 2019-02-27 10:45:25 WARN Reflections:179 - given scan urls are empty. set urls in the configuration
logger.orgReflections.name = org.reflections.Reflections
logger.orgReflections.level = off
logger.sunReflections.name = sun.reflect.Reflection
logger.sunReflections.level = off

appender.console.type = Console
appender.console.name = stdout
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
appender.console.filter.threshold.type = ThresholdFilter
appender.console.filter.threshold.level = error

appender.rolling.type = RollingFile
appender.rolling.name = FILE
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
appender.rolling.filePattern = ./${filename}.%i
appender.rolling.policy.type = SizeBasedTriggeringPolicy
appender.rolling.policy.size = 4MB
# Set the immediate flush to true (default)
# appender.rolling.immediateFlush = true
# Set the append to true (default), should not overwrite
# appender.rolling.append=true
33 changes: 33 additions & 0 deletions WindowsInstaller/Install Files/ntpcfg.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off

:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

"%temp%\getadmin.vbs"
exit /B

:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------

net stop "Windows Time"

w32tm /config "/manualpeerlist:pool.ntp.org 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org cn.pool.ntp.org 0.cn.pool.ntp.org 1.cn.pool.ntp.org 2.cn.pool.ntp.org 3.cn.pool.ntp.org"

net start "Windows Time"

sc config w32time start= auto
Loading