NB: we're still using HSQLDB svn r5836
Updated README.md
Added log4j2.properties file for logging!
Imported CIYAM-AT jar into project-local Maven repo
CIYAM-AT related:
ATData
ATStateData
ATTransactionData
DeployATTransactionData
AT
DeployATTransaction
ATRepository
HSQLDBATRepository
HSQLDBDeployATTransactionRepository
ATTests
DeployATTransactionTransformer
Fixed Block so correct block hash and timestamps are generated,
especially when previous/next block versions differ.
Added extra call in BlockTransformer to aid this.
Fixed GenesisTransaction.isValid's incorrect amount test.
Fixed comments in TransferAssetTransaction and incorrect use of BlockChain.getVotingReleaseTimestamp()
instead of BlockChain.getAssetsReleaseTimestamp().
Added new TYPEs to HSQLDBDatabaseUpdates, and set LOB granularity to 1KB for AT use.
Added AT_address column to DeployATTransactions in HSQLDB.
Added ATs, ATStates and ATTransactions tables.
(You will need to discard existing database and rebuild).
Fixed incorrect byte array output in IssueAssetTransactionTransformer,
where Asset "references" were not processed correctly.
Added support for BigDecimal serialization to a byte-array size other than the standard 8.
NOTE: requires HSQLDB built from svn rev 5836 or later
Fixed BuyNameTransactionData constructors not picking up nameReference.
Added new "orphan" tool to regress blockchain back to specified block.
Added new Block constructor for when receiving a block from the network.
Fixed Block generatingBalance/forging code to be compliant with v1.
Added logging of transactions that fail validation during block validation.
Fixed buyer/seller balances not being updated during name purchase.
Generally replace BigDecimal.compareTo expressions with "<operator> 0" form.
e.g. instead of someBigDecimal.compareTo(anotherBigDecimal) == 1
we now have someBigDecimal.compareTo(anotherBigDecimal) > 0
Fix amounts involved in BuyNameTransactions.
Renamed Transaction.calcSignature to .sign
Refactored Transaction.toBytesLessSignature to TransactionTransformer.toBytesForSigning,
which itself calls subclass' toBytesForSigningImpl,
which might override Transaction.toBytesForSigningImpl when special v1 mangling is required.
Corrected more cases of NTP.getTime in transaction processing
which should really be transaction's timestmap instead.
Fixed HSQLDB-related issue where strings were padded with spaces during comparison.
Some column types no longer case-insensitive as that mode of comparison
is done during transaction validation.
Added missing option_index column to CreatePollTransactionOptions which was causing
out-of-order options during fetching from repository and hence signature failures.
Added unit tests for v1-special mangled transaction signature checking.
Removed checks for remaining bytes to ByteBuffer in various transaction transformers'
fromByteBuffer() methods as the buffer underflow exception is now caught in
TransactionTransformer.fromBytes.
Corrected byte-related transformations of CreatePollTransactions that were missing
voter counts (albeit always zero).
Corrected byte-related transformations of IssueAssetTransactions that were missing
duplicate signature/reference (v1-special).
Added "txhex" tool to output transaction in hex form, given base58 tx signature.
Added "v1feeder" tool to fetch blocks from v1 node and process them.
Added isFulfilled property to asset orders so completed orders can be filtered out.
Fixed migrate app by adding dummy name_reference values to UpdateNameTransactions and BuyNameTransactions INSERTS.
Fixed migrate app to use "poll_name" instead of "poll" for column name. Ditto "option_name" instead of "option".
Fixed some other incorrect column names in HSQLDBAssetRepository.
More unit tests but probably need yet more to cover complicated asset order matching with various divisibility settings.
Maybe fuzzing would help here somehow?
Settings class reworked to allow easier testing
Fix to Payment.orphan() where fee was being incorrectly subtracted instead of added
Added AssetRepository.fromAssetName(String): AssetData
Fixed deleting assets from HSQLDB repository due to broken column name in SQL.
Fixed saving IssueAssetTransactions in HSQLDB repository due to missing column binding.
More TransactionTests!
Fixed IssueAssetTransactions not being constructed with signature.
Fixed incorrect MessageTransactionData constructors.
Refactored various transactions to remove duplicate code.
e.g. in CancelOrderTransaction.process() use getCreator() instead of explicit repository call.
Added name_reference to BuyNameTransactions HSQLDB table.
Fixed incorrect SQL in HSQLDBMultiPaymentTransactionRepository.
More unit tests!
Fixed wrong data length in CancelOrderTransactionTransformer.
Fixed wrong data length in CreateOrderTransactionTransformer.
Fixed missing payment bytes in MultiPaymentTransactionTransformer.toBytes();
* Added more columns/properties to NameData to support updating timestamps, name sales
and reference to last transaction that changed Name (for orphaning support).
* Fixed serialization/deserialization bugs in MessageTransactions
* More tests
* Added simple genesis block timestamp setting to help testing
* Fixed setting account's last reference
* Moved some Poll constants from CreatePollTransaction to Poll
* HSQLDB: added TYPE PollOptionIndex
* HSQLDB: added previous_option_index to VoteOnPollTransactions table to help orphaning
* HSQLDB: renamed "poll" to "poll_name" in same table
* HSQLDB: PollOptions now has additional option_index column
* Improved TransactionTests to allow for different genesis block timestamps.
* Also added VoteOnPollTransaction test
Added CreatePollTransactionData constructor that doesn't need signature (for creating new transactions).
Added missing "published" timestamp support to PollData and Poll.
Removed extraneous timestamp test from Block.isValid.
Corrected inconsistent column names in poll-related tables in HSQLDBDatabaseUpdates.
HSQLDBRepository.checkedExecute(PreparedStatement) now takes extra Object... params
so that values can be bound to placeholders. Code moved from checkedExecute(String, Object...).
This fixes an issue with exists(String, String, Object...) where placeholders weren't having
any values bound to them. (Also removed "ORDER BY NULL" clause which isn't supported by HSQLDB).
HSQLDBVotingRepository method stubs fleshed out with real code.
TransactionTests rejigged but more work needed to test various transactions before/after their feature
release. e.g. testing create poll transactions before & after they supposedly went live.
Could do with a GenesisBlock constructor that takes a timestamp for testing purposes?
CreatePollTransactionTransformer now skips serializing a null signature,
in the same way PaymentTransactionTransformer does, to aid getBytesLessSignature().
This will probably need to be rolled out to all other transaction types.
* Add implementation for Account.getBalance(assetId, numberOfConfirmations)
* Added orphan() code to Block (CIYAM AT not yet supported)
* Added getOrder() 'navigation' method to CreateOrderTransaction
* Added missing transaction-type cases to various switches in Transaction, transformers, repositories, etc.
* Various repository delete() methods added
* Added save/delete support for transaction types that include payments, like multipayment and arbitrary
* Changed "recipient" in HSQLDB SharedTransactionPayments from QoraPublicKey to QoraAddress
* Code added for calculating an account's generating balance. (CIYAM AT support yet to be added).
* Added associated code in Block for calculating next block's timestamp, generating balance, base target, etc.
* ValidationResult enum added to Block, mostly to aid debugging.
* Block.isValid() now returns ValidationResult instead of boolean.
* Block.isValid() now has added proof-of-stake tests.
* Some blockchain-related constants, like feature release heights/timestamps, moved from Block to BlockChain.
* Added better Block constructor for use when creating a new block.
* Added helpful 'navigation' methods to Block to get to block's parent (or child).
* Changed visibility of block's individual signature calculators to protected, in favour of public sign() method.
* Added asset existence check to Payment.isValid.
* All current transaction objects (qora.transaction.*) now have private subclassed transaction variable to save multiple casts in various methods.
* Also added to above:
* isInvolved(Account) : boolean
* getRecipients() : List<Account>
* getAmount(Account) : BigDecimal
* Added BlockRepository.getLastBlock() to fetch highest block in blockchain.
* Added diagnostics to HSQLDBRepository.close() to alert if there are any uncommitted changes during closure.
(Currently under suspicion due to possible HSQLDB bug!)
* Old "TransactionTests" renamed to "SerializationTests" as that's what they really are.
* New "TransactionTests" added to test processing of transactions. (Currently only a PaymentTransaction).
* PaymentTransformer.toBytes() detects and skips null signature. This was causing issues with Transaction.toBytesLessSignature().
Needs rolling out to other transaction types if acceptable.