Commit Graph

75 Commits

Author SHA1 Message Date
catbref
9e52f20f71 Revert back to HSQLDB v2.5.0-fixed until out-of-memory issue located 2020-08-24 14:07:36 +01:00
catbref
b9d819220d Bumped HSQLDB to v2.5.1 and AT/cross-chain SQL speed-ups! 2020-08-15 11:12:10 +01:00
catbref
7db96c672f Bump to v1.3.3 2020-08-13 14:16:50 +01:00
catbref
6c1b21da22 Bump to v1.3.2 2020-08-12 17:30:37 +01:00
catbref
d4ac87f91d Update to more efficient CIYAM AT v1.3.7 2020-08-12 14:17:09 +01:00
catbref
52f4008725 Bump version to v1.3.1 2020-08-10 15:24:37 +01:00
catbref
02966bf39a Update CIYAM-AT to v1.3.6 to make use of lambda-based logging 2020-08-10 14:05:42 +01:00
catbref
7bb060781e Bump to v1.3.0 - including new trade-portal feature 2020-08-06 15:40:11 +01:00
catbref
47679b7f6c Merge branch 'trade-bot' 2020-08-06 09:00:45 +01:00
catbref
2df045396d Bump to v1.2.3 2020-07-28 11:27:21 +01:00
catbref
7377893050 WebSocket improvements, inc. bump Jetty to v9.4.29-20200521
Various issues in Jetty v9.4.22 (and some later versions too)
cause websockets to use up all available threads.

Bumped Jetty to v9.4.29 to resolve some of these issues.

Changed some Qortal-side websocket code to minimize
locking on websocket notifiers. Websocket messages now
sent async, although the returned Futures are discarded,
as it's up to the remote end to consume fast enough.

Changed Controller to only request a SysTray update before
synchronization if there's a chance node might change height.
Similarly, Controller only requests SysTray update after
synchronization if chain tip has actually changed.
Both of the above together should reduce the number of
messages sent out via the admin status websockets.
2020-07-24 10:34:42 +01:00
catbref
c3eb385066 WIP: cross-chain trading with new lockTimes, requires AT v1.3.5 2020-07-17 08:39:45 +01:00
catbref
d81729d9f7 Bump to v1.2.2 2020-07-03 12:14:31 +01:00
catbref
d8c5e557d8 Update uiLocalServers, autoUpdateRepos and bump to v1.2.1 2020-06-30 15:41:53 +01:00
catbref
e05fcd6655 Final genesis block & bump to v1.2.0 2020-06-29 15:45:10 +01:00
catbref
11040ae60a Added ws://hostname:apiport/websockets/chat/active/{address}
Unified Transaction.importAsUnconfirmed() and Controller.onNetworkTransactionMessage()
to both call Controller.onNewTransaction().

Modified Controller.onNewTransaction() to only send transaction signature to
other peers, instead of full transaction. Peers can request full transaction if they
don't have it.

Controller.onNewTransaction() also calls ChatNotifier, which in turn
notifies websocket handlers about new CHAT transactions.

Added jetty websocket dependency to pom.xml
2020-06-12 10:24:22 +01:00
catbref
0164bca2d7 Exclude io.druid.java-util from build, removing tons of libsigar 2020-05-21 17:05:17 +01:00
catbref
197c742ce7 Major work on Registered Names
Changes include:

* Allowing renaming
* Tracking last-updated timestamps
* More stringent Unicode processing
* Way more unit tests
* Max name length reduction to 40 chars

Note: HSQLDB repository table changes
2020-05-15 14:08:46 +01:00
catbref
c7c419a3cd Bump version in pom.xml to v1.1.0 ready for launch 2020-05-07 13:30:34 +01:00
catbref
d03cca2e76 Merge branch 'BTC-ACCT' into launch 2020-05-01 10:09:54 +01:00
catbref
360f6cd4f1 Bump to v1.0.7 2020-04-24 09:44:35 +01:00
catbref
98506a038b Loads of work on CIYAM AT support, including BTC-QORT cross-chain trading.
We require AT v1.3.4 now!

Updated AT-related logging.

Added "isInitial" flag to AT state data so that state data created at
deployment is not added to serialized block data.

Updated BTC-QORT AT code and tests to cover various scenarios.

Added missing 'testNtpOffset' to various test versions of 'settings.json'.
Added missing 'ciyamAtSettings' to various test blockchain configs.

Loads of AT-related additions/fixes/etc. to core code, e.g Block
2020-04-23 09:13:32 +01:00
catbref
3eaeb927ec More work on QORT-BTC ACCT
Requires fix in CIYAM AT v1.3.2

New version of Qortal cross-trade AT code.

Change how Qortal addresses are managed in QortalATAPI from using
base58 strings (that are too long) to using hex form (25 bytes)
as they need to fix into 32 byte A/B register.

Generate AT addresses using DeployAtTransaction's signature instead
of convoluted hash of AT data like name, description, etc.

Add startTime as arg to GetTransaction test app.

Add missing fields (name, description, ATType, tags) to DeployAT test app.
2020-04-23 09:13:32 +01:00
catbref
87bb9090f5 CIYAM AT & cross-chain trading.
Bump CIYAM AT requirement to v1.3

Remove multi-blockchain AT aspect for now (BlockchainAPI).

For PUT_PREVIOUS_BLOCK_HASH_INTO_A we no longer use SHA256 to condense 64-byte block signature into 32 bytes.
Now we put block height into A1 and SHA192 of signature into A2 through A4.
This allows possible future lookup of block data using "block hash", with verification that it is the same block.

Some AT functions use "address in B" but sometimes we populate B with account's public key instead.
So the method "getAccountFromB" is smart and checks for an actual, textual address in B starting with 'Q', otherwise assumes B contains public key.

The Settings field "useBitcoinTestNet" (boolean) now replaced with "bitcoinNet" (String) with possible values MAIN (default), TEST3, REGTEST.
This allows for more varied development/testing scenarios.

Use correct Bitcoin nSequence value 0xFFFFFFFE for P2SH, i.e. enable locktime, disable RBF.

Roll REGTEST checkpoints file generator into main BTC class.

Yet another rewrite of Bitcoin P2SH scripts for BTC-QORT cross-chain trading.
Added associated test classes BuildP2SH, CheckP2SH, DeployAT (unfinished).
2020-04-23 09:13:32 +01:00
catbref
369a45f5c0 BTC-ACCT progress
Bump bitcoinj to 0.15.5 for fixes.

lockTime is int (seconds since epoch), not long (ms since epoch).

Improve output of Initiate1.

Added (most of) Respond2.
2020-04-23 09:13:31 +01:00
catbref
2ddb1fa23e Bump version to v1.0.6 2020-03-31 08:04:35 +01:00
catbref
0594bdf1c7 Bump to v1.0.5 in pom.xml. Filter out build/test artifacts from shaded JAR. 2020-03-24 11:17:43 +00:00
catbref
5eafdf3c80 Bump version to 1.0.4 2020-03-19 14:30:02 +00:00
catbref
95cb5f607b Use HSQLDB v2.5.0 but with fix for INSERT...ON DUPLICATE KEY UPDATE bug 2020-03-18 17:58:16 +00:00
catbref
e0e9673837 Massive refactor to change 'qora' references to 'qortal'.
Blockchain configs will need "v2Timestamp" feature trigger renaming to "qortalTimestamp"!

Due to Controller.VERSION_PREFIX changing, peer-to-peer protocol version detection has
been changed. Was previous a substring match, now we test peers's buildTimestamp is at
least Peer.V2_PROTOCOL_TIMESTAMP_THRESHOLD. Changes in Peer.java.

Also added comment and throw() to QortalATAPI.getNextTransactionTimestamp()
as this needs given the change to Qortal's block timestamps from legacy Qora.

Changes to HSQLDB data types, e.g. QoraAddress to QortalAddress, means existing
database will need to be thrown away after this commit!
2020-02-04 12:11:37 +00:00
catbref
2af370d55d pom.xml modifications for reproducible builds
Seems to produce fat JARs with the same MD5 after repeated runs of:
mvn clean package

Needs testing on other platforms, hence this commit.

Also trimmed some unneeded included JAR libraries from pom.xml,
e.g. netty, async-http-client,
and the *.js.map files from Swagger-UI, which seems to reduce
output JAR size from about 51MB to about 44MB.
2020-01-23 11:59:34 +00:00
catbref
7b24ac6e00 Bump version to 1.0. Bump BC to 1.64, Jetty to 9.4.22 2019-11-12 15:05:39 +00:00
catbref
568a1f8a30 Migration to Java 11
Updated pom.xml.
Updated dependencies, including various minor code mods, esp. bitcoin-related.

Starts up and talks to Java 8 nodes!

Dev environment should be at least Eclipse 4.11 with m2e 1.9.1+
2019-09-30 18:06:00 +01:00
catbref
06095d633e Modify pom.xml for Qortal & add ConciseSet
ConciseSet provided by io.druid.extendedset
but we need to exclude older versions of jackson-xml
2019-09-13 14:32:32 +01:00
catbref
73e53120a9 Improved detection of inaccurate system clock & nagging.
Now uses several NTP servers to determine mean offset from
system clock to internet time.

If abs(offset) > 500ms or NTP service not running then
user is 'nagged' via system tray pop-up notification
with instructions on how to fix.

Also improved system tray translations!
2019-08-13 09:14:07 +01:00
catbref
fdf35bba74 Commented-out commons-net in pom.xml as no longer needed 2019-08-06 11:17:08 +01:00
catbref
bdfbea3a53 Remove OSGi/felix from pom.xml 2019-08-06 10:57:29 +01:00
catbref
46dc91e5a0 Bump HSQLDB from svn r5970 to release v2.5.0 2019-08-02 13:05:18 +01:00
catbref
747f5e41cf Bump Jetty to 9.4.17.v20190418 due to CVE-2019-10247
+ remove older version of package-info-maven-plugin
2019-04-30 09:00:30 +01:00
catbref
ea913ad90e Bump HSQLDB to r5970 2019-04-29 11:04:19 +01:00
catbref
d1c547f24a Refactor to use BouncyCastle Ed25519/X25519, and more...
Remove old whispersystems, etc. *25519 and use new v1.61 BouncyCastle.

Fix proxy forging private key derivation from X25519 shared secret.
Also include Javascript test version for comparison.

Fix block rewards for proxy forging.

Add extra useful info to API call GET /admin/forgingaccounts.
Fix API response to POST/DELETE /admin/forgingaccounts when
passed invalid private keys.

Added block rewards and account flags to testchain config.

Tests to cover changes above.
2019-04-17 12:32:03 +01:00
catbref
d5a2e5be19 Bump Eclipse Jetty version to 9.4.12.v20180830 due to CVE 2019-04-10 07:41:46 +01:00
catbref
5f5b847bee Using m2e-aware version of package-info-maven-plugin (v1.0.2-m2e) 2019-03-26 11:03:50 +00:00
catbref
cdd1f5e966 API modifications, remove blockchain defaultGroupId, Eclipse/git
GET /assets/trades/recent expanded to allow multiple otherAssetIds

When GET /assets/balances is called with address(es) but no assetIDs
then it will return balances for all assets, including zero balances
for assets the addresses don't own.

GET /addresses/{address} no long fakes a default groupID - in fact
defaultGroupId now removed from blockchain config.

Some Eclipse IDE files now hidden/removed from git repo.
2019-03-11 11:17:34 +00:00
catbref
16c1b13ab2 Proper JSON unmarshalling for settings, blockchain config, genesis block
GenesisBlock (v4) now supports various transaction types (issue-asset, etc.)
 with generated signatures (like genesis transaction signature) and
 missing references inserted.

JUnit reverted back to v4 for Eclipse support (for now).
2019-02-25 13:31:05 +00:00
catbref
7f4511cb7b Networking and repository
Some pom.xml changes to reduce maven-shade-plugin conflicting classes warnings.

Repository now supports SAVEPOINT and ROLLBACK TO SAVEPOINT.
HSQLDB concurrency/transaction model changed from LOCKS to MVCC to help with
 transaction deadlocks/rollbacks.

More XXXs and TODOs added to Block.java for investigation/fix/improvements.
Also used new repository SAVEPOINT feature when validating transactions
 instead of rolling back entire transaction. This fixes problem during
 synchronization where the rollback would undo previously synchronized,
 but not yet committed, blocks!

Transactions orphaned by Block.orphan ARE now added to unconfirmed pile,
 unlike before.

Concurrent lock now prevents simultaneous block generation and synchronization,
 including synchronization via multiple peers.

Lots of new networking code: peer lists, block signatures, blocks,
 blockchain synchronization.

PEERS_V2 message now supports hostnames, IPv6 and port numbers.

Fixed bug with block serialization for transport over network.
2019-02-01 14:03:06 +00:00
catbref
0db43451d4 Interim networking code commit in case of dev catastrophe!
DB shape change from v29 to add peer info.
New NetworkRepository to handle above.

Peer handshaking with v2 anti-DoS PoW code.
Handshaking refactored into a state-machine-like enum.
Some peer-related API calls added.

Peers exchange pings, heights, peers.

No actual peer sync yet.

Other changes:

Peer version info taken from Maven build properties/resource file.
AnnotationPostProcessor more resilient when fetching PathItems.
Per-repository session debugging flag that can be toggled at will.
HSQLDBRepository.delete() now returns int so callers can detect
 whether anything was actually deleted.
Some renaming to settings.
2019-01-30 18:24:10 +00:00
catbref
4be58514c0 Unify API calls that return lists + offload pagination to repository
API calls that return lists now take limit, offset and reverse params.

API calls that used to return data & optional list (e.g. blockWithTransactions)
now only return base data. The optional lists can be fetched via
a different API call.

Also: SLF4J now routes logging to log4j2 so start up output cleaned up.
Suppressed extraneous Jersey warning about Providers during start-up injection.
2019-01-24 16:42:55 +00:00
catbref
2497ac256c Added API call for creating an asset bid/ask order
Also added test for missing creator public key on API-submitted
transaction creation calls, like /payments/pay or /asset/issue.
(Needs to be an OpenAPI validator added at some point).
2019-01-04 19:10:50 +00:00
catbref
5c6e239d76 initial work towards OSGi
refactored packages so they all start with org.qora

added some attempt at OSGi mega bundle using Maven (doesn't work)
2019-01-04 10:19:33 +00:00