Commit Graph

327 Commits

Author SHA1 Message Date
Matthew Nesbit
e3aef96b09 Merge remote-tracking branch 'remotes/origin/master' into mnesbit-cor-261-artemis-over-ssl
# Conflicts:
#	build.gradle
2016-07-27 15:43:01 +01:00
Andrius Dagys
e8c84867cf Merged in andrius-logging (pull request #240)
Enable logging to file
2016-07-27 14:18:24 +01:00
Matthew Nesbit
772ce28a81 remove extra space 2016-07-26 15:42:11 +01:00
Matthew Nesbit
9a9df847af Merge remote-tracking branch 'remotes/origin/master' into mnesbit-cor-261-artemis-over-ssl 2016-07-26 15:25:58 +01:00
Matthew Nesbit
fea452d9ac Change to a ConcurrentHashSet whitelist so that we don't hold any locks across the DNS lookup. 2016-07-26 14:40:30 +01:00
Clinton Alexander
e81d8b9928 Removed reference from progress tracker output to improve output readability. 2016-07-26 10:43:41 +01:00
Matthew Nesbit
cb8876678e Address comments from code review. Also, make whitelist registration synchronized. 2016-07-26 10:35:59 +01:00
Matthew Nesbit
ed52f2b35d An implementation of a Security Provider that replaces the default TrustManager with one that checks certificate names against a manually controlled white list. This isn't activated anywhere yet, but the network map should register the valid node dns names. 2016-07-26 10:35:58 +01:00
Matthew Nesbit
e5777fd999 Fetch KeyStore passwords from NodeConfiguration 2016-07-26 10:35:57 +01:00
Matthew Nesbit
4c08141ce3 Tidy up based upon comments on PR 2016-07-26 10:35:56 +01:00
Matthew Nesbit
c7bc5ae652 Correct usage of hostName and cannonicalHostName in certificates to ensure the SSL certificates validate on Linux 2016-07-26 10:35:55 +01:00
Matthew Nesbit
00f897d58d Add X509 creation and manipulation utilities to core and enable SSL in ArtemisMQ 2016-07-26 10:35:54 +01:00
Matthew Nesbit
0d68523f5c Validate protocol type and args via whitelist ahead of class loading. Also, push this work into another method on the Factory. 2016-07-25 16:35:45 +01:00
Clinton Alexander
93f4440c14 Moved IRS web folder up a level. Added support for static serving plugins. 2016-07-25 10:30:30 +01:00
Andrius Dagys
e7ff5b8f6f Typo fix 2016-07-22 17:31:03 +01:00
Andrius Dagys
2142bd1d8a Added Log4j bindings for SLF4J. Test log output is redirected to the console, and demo output is now additionally stored in a rolling log file. 2016-07-22 16:15:00 +01:00
Andrius Dagys
c442cd01a7 Merged in andrius-cleanup-tweaks (pull request #208)
Remove the "verify correct notary has signed" check from TwoParty protocols
2016-07-18 10:40:25 +01:00
Ross Nicoll
c32af56b41 Rebuild commercial paper contracts using clauses 2016-07-13 16:55:18 +01:00
Ross Nicoll
cba3aab96e Rebuild asset contracts using clauses 2016-07-13 13:08:23 +01:00
Ross Nicoll
254592dc54 Move protocols into correct package 2016-07-12 18:42:00 +01:00
Matthew Nesbit
3a5399f878 Remove TODO associated with the fact that the ZIP filesystem does not specify the Path Separator character. Add a test to check access through forward or backward slashes is consistent. 2016-07-12 13:43:44 +01:00
Andras Slemmer
d7cc34c9a5 all: Full stops in comments! 2016-07-11 17:58:53 +01:00
Mike Hearn
e28ecae8c0 Address review comments 2016-07-11 18:47:24 +02:00
Mike Hearn
2be91ff516 Minor: tighten variance when possible (via the Inspector) 2016-07-11 18:15:28 +02:00
Mike Hearn
0a2f313d40 Minor: run IntelliJ 'code cleanup' 2016-07-11 18:15:28 +02:00
Mike Hearn
41d092a169 Minor: optimize imports 2016-07-11 18:15:28 +02:00
Mike Hearn
6b7580c977 Minor: fix compiler warnings. 2016-07-11 18:15:28 +02:00
Mike Hearn
cc22810b09 Testing cleanup:
- Move code out of ambiguously named TestUtils files (there were three). Sometimes it's simpler to just put these things into the contract source files directly.
- Remove JavaTestHelpers objects (there were three), in favour of just giving the top level kotlin file class better names.
- Misc other small tweaks and cleanups.
2016-07-11 16:22:02 +02:00
Ross Nicoll
6b775ebd4d Replace named timestamping authority with notary
As the timestamping authority is now always the notary service, contracts should
no longer be using name-based lookup of the timestamping authority (as this will
generally be wrong). This introduces a new "timestamp" property on a transaction,
and updates most contracts to refer to it.

In some cases (IRS, CommercialPaper) there are transactions with no input states
to derive notary from, that use timestamps. In these cases a notary is specified
in the command.
2016-07-11 14:54:36 +01:00
Andras Slemmer
d0903ae265 docs: Rename test tutorial subtitle 2016-07-11 14:25:27 +01:00
Andras Slemmer
e13a95857a core: Remove colons from @param comments 2016-07-11 14:25:27 +01:00
Andras Slemmer
4324e33fea testdsl: Removed R type parameter, unify verifies() interface 2016-07-11 14:25:27 +01:00
Andras Slemmer
9bb8439dc3 testdsl: Add failsWith to Ledger 2016-07-11 14:25:27 +01:00
Andras Slemmer
cd0299f650 testdsl: Javadoc comments 2016-07-11 14:25:27 +01:00
Andras Slemmer
3d885eb928 testdsl: Clean up TestUtils.kt 2016-07-11 14:25:27 +01:00
Andras Slemmer
c3060c11c0 testdsl: Use and expose TransactionBuilder in TestTransactionDSLInterpreter 2016-07-11 14:25:27 +01:00
Ross Nicoll
1ae8ada999 Add support for clause based contract verification 2016-07-08 11:17:24 +01:00
Matthew Nesbit
eee049d66b Add cacheing to ServiceLoader scanning of plugins and add a TODO on whitelisting 2016-07-08 10:38:23 +01:00
Matthew Nesbit
1fb4371de9 Make the IRS Demo web api an api plugin (scanned from the Node classpath) and use the same permission checking entry point for web api's as the scheduler.
Fix whitespace

Change ProtocolLogicRefFactory to use Map<String, Set<String>> as whitelist definition
2016-07-08 10:34:30 +01:00
Mike Hearn
ad3e9be1c8 Add a version number to gradle and allow "gradle install" to install the core module to the local Maven repository. 2016-07-07 13:59:55 +01:00
Andrius Dagys
b498928f75 Remove the "verify correct notary has signed" check. This is no longed necessary as the required notary key is added to the "signers" list during transaction construction. We have general validation rules that check the correct notary was included in the signers list, and that we have signatures for all "signers". 2016-07-07 13:22:30 +01:00
Mike Hearn
bbc5c2e981 Merged in mike-july-dependency-upgrades (pull request #200)
Upgrade dependencies, July edition.
2016-07-06 16:25:52 +01:00
Mike Hearn
2e3f689fd3 Minor: fix PublicKey.toShortString after the switch to ed25519 2016-07-06 16:04:10 +01:00
Mike Hearn
6fb7e59b91 Upgrade dependencies, July edition. 2016-07-06 13:56:22 +01:00
Andras Slemmer
0cf54d1c1f test dsl: Comment full stops 2016-07-06 13:25:08 +01:00
Andras Slemmer
26d8973746 test dsl: Add TODO on type synonyms 2016-07-06 13:25:08 +01:00
Andras Slemmer
f177b1ffaa test dsl: LastLineShouldTestForVerifiesOrFails->EnforceVerifyOrFail 2016-07-06 13:25:08 +01:00
Andras Slemmer
e31b769fef test dsl: Dsl->DSL, add top-level transaction primitive, add ledger-embedded signAll, other cosmetics 2016-07-06 13:25:08 +01:00
Andras Slemmer
e3d6f51049 contracts, core, node: Port TransactionForTest tests to new DSL 2016-07-06 13:25:08 +01:00
Andras Slemmer
a27f195b4f core: Add LastLineShouldBeVerifiesOrFails, fix attachment primitive, Java interop 2016-07-06 13:25:08 +01:00
Andras Slemmer
f4a6a43aa6 contracts, core: Port CommercialPaperTests, IRSTests, ObligationTests, TransactioGroupTests 2016-07-06 13:25:08 +01:00
Andras Slemmer
cb47e00feb core: Add convenience input(), remove TransactionGroupDSL 2016-07-06 13:25:08 +01:00
Andras Slemmer
9b36df607e core: Remove binding of State type in test dsl 2016-07-06 13:25:08 +01:00
Andras Slemmer
bf4272b64a core: transaction/ledger DSL interfaces and implementation for tests 2016-07-06 13:25:08 +01:00
Shams Asari
5c0e7fbbf2 Moved topic parameter from send/receive methods to a ProtocolLogic property 2016-07-05 15:12:25 +01:00
Shams Asari
a02263937c send and sendAndReceive use Party for the destination 2016-06-30 12:04:39 +01:00
rick.parker
5271882dcd Event scheduling and docs for event scheduling 2016-06-30 08:51:52 +01:00
Ross Nicoll
b3af0ce218 Merged in rnicoll-upgrade-infrastructure (pull request #193)
Infrastructure ahead of contract upgrade support
2016-06-29 17:26:44 +01:00
Ross Nicoll
11eff398a0 Minor: Typo (classfiles -> class files) 2016-06-29 17:16:47 +01:00
Ross Nicoll
c767638127 Move DummyContract.State into its own file
DummyContract.State isn't actually used by the DummyContract any more, so shouldn't
be part of that contract class.
2016-06-29 17:16:46 +01:00
Ross Nicoll
779034691e Add AbstractTransactionSubstitutionProtocol
Abstracts the NotaryChangeProtocol to be extensible for other use-cases.
2016-06-29 17:16:46 +01:00
Andrius Dagys
dd9a653ab4 TransactionBuilder: added a comment explaining the default notary parameter purpose 2016-06-29 16:32:29 +01:00
rick.parker
cfe54c5f21 Fix up bug in attachment Zip file processing when path might not be normalised to start with 2016-06-29 09:10:18 +01:00
Clinton Alexander
9d4f75f241 Improved readability and brevity of hasEmojiTerminal. 2016-06-28 14:03:32 +01:00
Clinton Alexander
bef4258430 Fixed Emoji crash where LANG envvar is not defined in particularly exotic setups (msys bash in Powershell for example) 2016-06-28 14:03:32 +01:00
Andras Slemmer
47decb3bbe coree: Expose MOCK_IDENTITY_SERVICE as MockIndentityService instead of IdentityService 2016-06-24 18:33:53 +01:00
Andras Slemmer
5973725186 core: Make top-level side-effecting getters lazy instead 2016-06-24 18:33:21 +01:00
Andras Slemmer
10d8f5cd06 core: Add comment on how to define globals for the Java test DSL 2016-06-24 16:37:43 +01:00
Andras Slemmer
bc326660a3 contracts, core: Fix static init cycle issue of JavaTestHelpers 2016-06-24 16:37:43 +01:00
Andras Slemmer
341adafd3a contracts, core: Rename Java to JavaTestHelpers 2016-06-24 16:37:43 +01:00
Andras Slemmer
040e51ec12 contracts, core: Expose top-level DSL values/functions to Java by wrapping them in an object
core: Add overloads for convenient Java interop

contracts, core: Uniform Java interop for tests, use camelCase
2016-06-24 16:37:43 +01:00
Andras Slemmer
bec1ab7a7e core: Add javadoc on how to be Java-compatible with the Kotlin DSL 2016-06-24 16:37:43 +01:00
Andras Slemmer
6109065dee core: Use LastLineShouldTestForAcceptOrFailure trick on rejects() 2016-06-24 16:37:43 +01:00
Andras Slemmer
2d8d5571c2 core: Add more info to ClashingThreads exception 2016-06-23 18:06:57 +01:00
Andras Slemmer
57270c8c66 core: Add nonce to DummyLinearState 2016-06-23 18:06:57 +01:00
Andras Slemmer
6bab0eb79f core: Add comment about Wallet.states 2016-06-23 18:06:57 +01:00
Andras Slemmer
f233780e08 core: Add DummyLinearState and AlwaysSucceedContract for testing 2016-06-23 18:06:57 +01:00
Andras Slemmer
2c7b86fee2 core: Add LinearState thread clash check to InMemoryWalletService.notifyAll 2016-06-23 18:06:57 +01:00
Andras Slemmer
3cc0cef9c5 core: Typo 2016-06-23 18:06:57 +01:00
Andrius Dagys
aaeb99ac25 Validating notary: check for missing signatures. The notary can only sign if all other signatures are present
Please enter the commit message for your changes. Lines starting
2016-06-23 16:15:14 +01:00
Ross Nicoll
99ae145edc Minor: Preparation work for Obligation contract 2016-06-23 13:17:22 +01:00
Andrius Dagys
e5e5383e71 Minor formatting and typo fixes 2016-06-22 14:36:01 +01:00
Ross Nicoll
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
Mike Hearn
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
Mike Hearn
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
Andrius Dagys
9f1a4e9254 Update docs relating to the multiple notary support work 2016-06-22 13:18:00 +01:00
Mike Hearn
39186c7e99 Minor: correct an API doc in AttachmentStorage 2016-06-22 13:46:57 +02:00
Mike Hearn
749949669f Minor: Make a few class field names and constructor layouts more consistent. 2016-06-22 13:46:57 +02:00
Mike Hearn
d084f76594 Minor: Remove a no longer relevant kdoc line 2016-06-22 13:46:57 +02:00
rick.parker
717a5ab197 Break out message handler changes
Special serializer for kotlin object definitions
2016-06-22 09:50:15 +01:00
Richard Green
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
Richard Green
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
rick.parker
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
Ross Nicoll
93e9d0459c Add custom serialiser for NonEmptySet 2016-06-20 16:08:17 +01:00
Ross Nicoll
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
Ross Nicoll
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
Andras Slemmer
32b593671b Merged in remove-warnings (pull request #169)
Remove warnings
2016-06-20 14:45:04 +01:00
Ross Nicoll
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
Ross Nicoll
a5e07c2600 Require all transactions are added via the ServiceHub.recordTransaction() function 2016-06-20 14:24:55 +01:00
Andras Slemmer
878a683823 core: Remove warnings 2016-06-20 14:16:13 +01:00