Commit Graph

795 Commits

Author SHA1 Message Date
d24ec06b40 Add netting support structures
Add NetType enum for use in contracts which deal with netting
Add BilateralNettingState interface
Add support for more complex issued things
2016-06-22 14:30:06 +01:00
7ee6bd05ce Refactor the wallet code:
- Rename NodeWalletService to InMemoryWalletService and move into the core module where it's available for unit testing.
- Make a new NodeWalletService that just inherits from InMemoryWalletService and doesn't customise it at all, for now.
- Take the cash specific functionality out of Wallet and into an extension property in the Cash contract (this compiles as CashKt.getCashBalance(wallet) for java users).
- Return the generated states in the fillWalletWithTestCash function.
2016-06-22 14:49:52 +02:00
f3d4639059 Testing: make the WalletFiller code a file-level singleton and fillTestWithCash an extension method. For Java users not much changes, the class is still called WalletFiller and the signature remains the same. Re-order some arguments to make it easier to use when accepting the defaults. 2016-06-22 14:49:52 +02:00
9f1a4e9254 Update docs relating to the multiple notary support work 2016-06-22 13:18:00 +01:00
39186c7e99 Minor: correct an API doc in AttachmentStorage 2016-06-22 13:46:57 +02:00
749949669f Minor: Make a few class field names and constructor layouts more consistent. 2016-06-22 13:46:57 +02:00
d084f76594 Minor: Remove a no longer relevant kdoc line 2016-06-22 13:46:57 +02:00
717a5ab197 Break out message handler changes
Special serializer for kotlin object definitions
2016-06-22 09:50:15 +01:00
859ee053d2 Merged in rg_todo_financetypes_242 (pull request #145)
Changed DateOffset to be an integer instead of enum. Usages and examples also changed. Also renamed to fixingPeriodOffset
2016-06-21 18:18:44 +01:00
6b80530ac6 Changed DateOffset to be an integer instead of enum. Usages and examples also changed. Also renamed to fixingPeriodOffset
Renamed fixingPeriod -> fixingPeriodOffset in the .json files
2016-06-21 18:17:39 +01:00
3ea1090446 Support for moving TestClock to just beyond a specific instant (helpful for schedule related testing)
Added TimeWindow to PR

Review feedback

Review feedback
2016-06-21 16:49:25 +01:00
93e9d0459c Add custom serialiser for NonEmptySet 2016-06-20 16:08:17 +01:00
723e610dfc Rename verifyMoveCommand()
Rename verifyMoveCommands() to verifyMoveCommand() to represent that move commands must
be singular within a transaction.
2016-06-20 16:08:16 +01:00
af53a52b06 Add common Issue and Move commands
* Add common Issue command to encourage presence of a nonce value when issuing state objects.
* Add common Move command for contracts which support being moved in order to fulfil other contracts.
2016-06-20 16:08:16 +01:00
32b593671b Merged in remove-warnings (pull request #169)
Remove warnings
2016-06-20 14:45:04 +01:00
8f57213270 Merged in rnicoll-force-record-tx (pull request #152)
Require all transactions are added via the ServiceHub.recordTransaction() function
2016-06-20 14:25:20 +01:00
a5e07c2600 Require all transactions are added via the ServiceHub.recordTransaction() function 2016-06-20 14:24:55 +01:00
878a683823 core: Remove warnings 2016-06-20 14:16:13 +01:00
c9cb024bb5 Merged in use-urandom-2 (pull request #166)
Use urandom 3
2016-06-20 14:15:03 +01:00
a7419b116d Add newSecureRandom() that uses a non-blocking SecureRandom provider on Linux 2016-06-20 14:11:03 +01:00
d4674a9d8f Add a comment to ContractState describing the intended constraints design. 2016-06-20 15:00:16 +02:00
30ca340b6e Refactored NotaryChangeProtocol and tests: moved the proposal verification step into the protocol.
Added another proposal verification step in the NotaryChangeProtocol.
Added the cause exception message to the 'notary change refused' error.
2016-06-17 15:05:35 +01:00
0a5b7ace35 Made TransactionBuilder abstract. Every transaction type now needs to implement and provide its own Builder. This is required since for specific types we need to run different logic when adding new items to the transaction. For example, when adding a new input state to a transaction of type NotaryChange we need to add all of the states participants to the signers list. 2016-06-17 15:05:35 +01:00
9958b5c603 Added 'signers' property to the transaction data models. Signers holds the list of all public keys that need to be signed for (command keys and additional ones such as notary).
Removed Notary & ChangeNotary commands, keys to be signed for are added to the signers list during transaction build phase.
2016-06-17 15:05:35 +01:00
70495a021e Introduce TransactionState, which wraps ContractState and holds the notary pointer.
Remove notary from ContractState.
Introduce TransactionType, which specifies custom validation logic for a transaction.
2016-06-17 15:05:35 +01:00
3b1e020082 Extended the data model so that every state has to define a set of 'participants' - parties that are able to consume that state in a valid transaction.
Added protocol for changing the notary for a state, which requires signatures from all participants
2016-06-17 15:05:35 +01:00
0c325c31a2 Revert "Merged in use-urandom-2 (pull request #159)"
This reverts commit 1a1ed3b9e6, reversing
changes made to 09e2e49d44.
2016-06-17 14:12:19 +01:00
1a1ed3b9e6 Merged in use-urandom-2 (pull request #159)
Use /dev/urandom try no.2
2016-06-17 13:36:23 +01:00
f9d1c54195 core: Add comments explaining the never-to-be-removed deprecated functions 2016-06-17 13:27:35 +01:00
1f171a1ece Revert "core: Removed unused deprecated test functions"
This reverts commit 1c09ff86ed6803fcda6c76b6f5e323621c4b0e06.
2016-06-17 13:27:35 +01:00
eaf37e2e7a core: make comment javadoc style 2016-06-17 13:27:35 +01:00
643d3bab2b core: force transaction tests to check for accept/fail 2016-06-17 13:27:35 +01:00
f0d74d0859 core: Removed unused deprecated test functions 2016-06-17 13:27:35 +01:00
ea7f9177d4 core: make newSecureRandom() a one-liner 2016-06-17 13:07:25 +01:00
481d2f7151 core: use newSecureRandom() instead of SecureRandom.getInstanceStrong() 2016-06-17 13:07:25 +01:00
6229e39b42 core: Add newSecureRandom() that uses a non-blocking SecureRandom provider 2016-06-17 13:07:25 +01:00
f06487aa4c Merged in sort-of-incremental-quasarScan (pull request #154)
Sort of incremental quasarscan
2016-06-17 10:38:39 +01:00
7f3458803c Protocols can use the serviceHub lazily in their constructors 2016-06-17 10:30:25 +01:00
dc5da8e1ad build: use QuasarPlugin instead of copypasta 2016-06-17 10:16:46 +01:00
2663a6390e core: Kryo extension methods for reading/writing ByteArrays prefixed with their sizes 2016-06-16 17:03:44 +01:00
5b4c4f167d core: .equals() -> == 2016-06-16 17:03:44 +01:00
2b4ebd4f09 core: use optimizedPositive for size serialization 2016-06-16 17:03:44 +01:00
cd91c6a0e7 core: add serialization test for keypairs 2016-06-16 17:03:44 +01:00
af3d87803d core: serialize bytearray sizes instead of relying on static sizes 2016-06-16 17:03:44 +01:00
376b73b823 core: switch to static size bytearray serialization of keypairs 2016-06-16 17:03:44 +01:00
22567d11b5 core: implement custom serializers for ed25519 keypairs 2016-06-16 17:03:44 +01:00
1fe283c113 core: switch to ed25519 2016-06-16 17:03:44 +01:00
9930e8d5c7 core: add net.i2p.crypto:eddsa dependency 2016-06-16 17:03:44 +01:00
512e304bf1 Merged in remove-commented-out-resolve-tx-proto (pull request #156)
Remove commented out ResolveTransactionsProtocol call as it is not required
2016-06-16 16:19:03 +01:00
ad72f3e48f Add issuer to cash amounts
Add issuer of a cash when referring to amounts of cash (except for the very few cases where
the issuer is not important, such as when referring to aggregated totals across a set of
issuers). Replaces CommonCashState with TokenDefinition, as a more accurate reflection of
what the class represents.
2016-06-16 15:05:49 +01:00