Commit Graph

395 Commits

Author SHA1 Message Date
catbref
c05fe58676 Add static method to extract generatorSignature from block reference 2019-07-22 18:24:45 +01:00
catbref
ce2dc9b8ad Reduce synchronization attempts from every 10s to every 60s 2019-07-22 18:20:29 +01:00
catbref
1b58d12005 Fix peer data bug where lastConnected was swapped with lastAttempted. 2019-07-22 18:20:04 +01:00
catbref
ad9b42dc5d Install initial peers when creating repository 2019-07-22 18:15:07 +01:00
catbref
6feca1f4d6 Synchronizer improvements & minor fix
Restrict synchronizer to only consider peers at most 60 blocks behind.

Synchronizer will only process a batch of 200 blocks at a time.

Improve debugging message in Peer.
2019-07-22 18:08:06 +01:00
catbref
4b02b7a14f Fix unit tests 2019-07-22 18:05:41 +01:00
catbref
ecdf8212ea Fix PROXY_FORGING transaction length issue 2019-07-22 18:03:17 +01:00
catbref
af22922025 AutoUpdate: added comment about mandatory use of OpenJDK JRE, not Java SE 2019-07-22 18:01:56 +01:00
catbref
c0ae99161b Auto-Update changes
Checking interval increased from 5 seconds to 5 minutes.
(Reduces repeated fails).

System tray icon should show message just prior to applying downloaded update.
2019-07-22 18:01:29 +01:00
catbref
6be9bf9c3c Add mnemonic phrase support to VanityGen 2019-07-22 18:00:47 +01:00
catbref
7a318c9fc7 Proxy forging improvements + account flags fixes
Proxy forging recipient no longer needs a public key on the blockchain
at the point PROXY_FORGING transaction is submitted.

Proxy forging recipient is given a last-reference, if they don't have one,
when they receive their first block rewards.

Split block fees in proxy forging scenario, using same share proportion.

100% proxy sharing is now allowed.

Fixed account flags processing for accounts in genesis block.
2019-07-22 18:00:12 +01:00
catbref
3ffcf50d7c Added TransactionParticipants index 2019-07-22 17:54:16 +01:00
catbref
88f9dd1c06 Remove old, unused r5836 HSQLDB & osgi-console.sh
Added notes/ and .mvn.classpath to .gitignore

Commit 2594d4f was:
Master branch tidy up
2019-07-22 17:46:23 +01:00
catbref
29428e9450 Add extra entries to blockchain.json, remove HttpsTest, add Vanity Gen
+ minor whitespace / comment / JAXB mods

Was commit e14381d:
working on genesis block
2019-07-22 17:05:10 +01:00
catbref
57be191814 Splash startup & sys tray 2019-07-18 18:46:18 +01:00
catbref
e5b3166df4 Improve synchronization 2019-07-18 18:40:23 +01:00
catbref
4744232a1c Don't try to sync with a peer that only has genesis block
Was 85bc70b:
new testchain timestamp + don't try to sync with a peer that only has genesis block
2019-07-18 18:36:19 +01:00
catbref
eac38d4212 new log4j2.properties
Commit was b8e5641, and commit message was:
Change API port to 9888 and P2P port to 9889 + new log4j2.properties
2019-07-18 18:31:58 +01:00
catbref
675596ed6e auto update debugging 2019-07-18 18:30:30 +01:00
catbref
52ac881db0 auto update checks download against hash in tx + checks against build timestamp 2019-07-18 18:29:58 +01:00
catbref
a49e3f7a4e auto update 2019-07-18 18:28:56 +01:00
catbref
20aa49a1f1 Another attempt at auto-update 2019-07-18 15:50:05 +01:00
catbref
63a36073ec Work on auto-update + repository path + Settings bugfixes
AutoUpdate needs separate logfiles for its process as
log4j2's rolling appender doesn't support locking.
So we create AU_LOGGER in AutoUpdate and set it up
using static { } block.

Added support for starting/querying/stopping auto-update
Windows service.

Changed Controller's public connectionUrl field to
getRepositoryUrl() public static method so it
can incorporate repositoryPath from Settings.

Controller has added support for auto-update on startup.

Fix bugs with Settings not using userPath properly.

Removed obsolete standalone binary classes:
* blockgenerator
* txhex
* v1feeder
2019-07-18 15:26:41 +01:00
catbref
e4482c5ade Initial auto-update support, API improvements, arbitrary tx improvements
Removed all @Produces from API resources as response content type is
sorted by Swagger.

Added API /admin/info for generic node info.

Added API /arbitrary/ endpoints.

Moved arbitrary data storage from ArbitraryTransaction to ArbitraryRepository.

V4 arbitrary transaction signature is based on data's hash.

Original commit was d02f282, and commit message was:
Initial auto-update support, network MAGIC change, arbitrary tx improvements
2019-07-18 14:53:19 +01:00
catbref
06e6802d97 More work on synchronization
Various fixes to synchronization

Added missing code for processing incoming block summaries in Network.

Fixed block summaries serialization and removed references to BlockData.

Fixed bug in transaction transformation where base transaction length
didn't include reference or fee lengths.

Original commit was ebbab7b
2019-07-18 13:59:49 +01:00
catbref
57b982d2fb Block summaries (repository/data/message/synchronizer) + BlockGenerator
Also refactored some tests.

Original commit was 06fe8fc, with commit message:
Initial implementation of random block generator, etc.
2019-07-18 12:15:11 +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
882d910631 Remove unneeded HSQLDB debugging and tidy some comments 2019-04-30 08:33:33 +01:00
catbref
a316b8a810 Potential HSQLDB deadlock fix
After opening repository connection with RepositoryManager.getRepostory(),
any 'read' from repository (e.g. SELECT) starts the transaction
even though HSQLDB documentation states there are no shared/read locks
in MVCC concurrency model.

The work-around for this is to 'reset' HSQLDB's in-transaction flag
by performing a ROLLBACK (Repository.discardChanges) immediately
after acquiring the blockchain lock (which is used to ringfence
changes that might collide like these).

Also adding an extra check to prevent payments to nonexistent AT
addresses as it touches Transaction.
2019-04-29 15:18:44 +01:00
catbref
b21ef18533 More HSQLDB deadlock debugging 2019-04-29 12:54:34 +01:00
catbref
ea913ad90e Bump HSQLDB to r5970 2019-04-29 11:04:19 +01:00
catbref
db77901026 grab latest block directly instead of via height 2019-04-26 15:01:57 +01:00
catbref
b4d0f9ab68 Allow multiple txType in API GET /transactions/search 2019-04-26 09:23:44 +01:00
catbref
b0b74eb48d Fix JAXB annotations for transactions with creatorPublicKey 2019-04-26 09:04:58 +01:00
catbref
d4ce797241 More HSQLDB debugging 2019-04-26 08:31:10 +01:00
catbref
b7687bf326 More HSQLDB debugging 2019-04-26 08:07:57 +01:00
catbref
0296c4bbb1 HSQLDB debugging & optimization for Transaction.isValidUnconfirmed 2019-04-25 18:29:01 +01:00
catbref
51fd029e22 Access to log entries from API & checks for some transaction-based API calls. 2019-04-24 15:02:37 +01:00
catbref
126e651f27 Change sync consensus to favour lower-value block sigs + other changes
API /addresses/{address} now returns lastReference taking unconfirmed into account.

Added DELETE /peers/known to remove all known peers from repository.

Added blockchain locking around Transaction methods like isValidUnconfirmed
as they (temporarily) update account lastReference.

Ditto getInvalidTransactions, etc.
2019-04-24 12:46:50 +01:00
catbref
d33ffee3ba Work on granting forging rights
Move hard-coded forging tiers to blockchain config.
Tests for granting forging rights.

Added API call to list top block forgers.

Fixed typo with Reward[s]ByHeight class name.
2019-04-19 09:55:04 +01:00
catbref
93230e9704 Add API call to list blocks with given generator. +more tests +pad genesis public key 2019-04-17 18:11:16 +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
8e74884536 Fixes after rebase from master 2019-04-12 14:41:59 +01:00
catbref
2f6ef32f35 Replace settings-based generator private keys with DB table and API calls 2019-04-12 13:01:26 +01:00
catbref
c9035edd2c Interim proxy minting commit
Added /addresses/proxying to find proxy forging mappings.

Added /addresses/proxykey/{genprivkey}/{recipientpubkey} to calculate proxy private key.

New Block.regenerate factory method to create new Blocks
 but without having to reprocess ATs, etc.

Added support for proxied generator in Block.calcGeneratorsTarget

BlockGenerator now generates and checks new blocks for various generators,
 including proxy generators.

BlockGenerator now uses generator private keys supplied by Settings.
Corresponding changes to Settings to load base58-encoded private keys.

+ minor stuff
2019-04-12 12:57:21 +01:00
catbref
9b859f3efd Interim minting commit with block rewards (untested)
+ minting long-term simulator
+ Maven pom.xml changes for Eclipse IDE
2019-04-12 12:56:12 +01:00
catbref
3c06d358b7 interim commit with proxy forging repository/transaction support
no block validity/generator support yet
2019-04-12 12:53:44 +01:00
catbref
2dc1720af8 Initial support for account flags + tx (genesis account use only atm) 2019-04-12 12:50:10 +01:00
catbref
85acc4d9df Fix incorrect refunds when cancelling asset orders
Also improved asset tests in that they don't use QORA any more
which takes fees/block rewards out of the picture.

More test assets are issued in the genesis block to
accomplish this:

1m TEST issued to Alice
1m OTHER issued to Bob
1m GOLD issued to Alice
2019-04-12 10:38:25 +01:00
catbref
2f51ced5c0 Fix incorrectly applied price improvement refund.
Also fix broken tests which contributed to this bug slipping by.
2019-04-12 08:44:13 +01:00