CORDA-1332 Reference input states (#3525)

* * First commit for reference input states feature.

* Added docs.
* Added additional test.

* Fixed whitespace.

* Rebased to master.
* Updated Raft and persistent notary implementations.

* Updated changelog.

* Updated topo sort to handle reference states.
* Stubbed out with referenced states flow.

* Added WithReferencedStatesFlow.
* Added Tests for WithReferencedStatesFlow.
* Added ReferenceState type.
* Rebased to latest version of master.

* Added better comments.
* Updated unit test.

* Added comment to explain a little hack.
* Fixed broken contract upgrade RPC test.

* Added minimum platform version check.
* Updated mock network so that notary nodes inherit the platform version set by the network's minimum platform version.
* References states can now only be used when minimum platform version >= 4.

* Created a new file to hold async operations as "WaitForStatesToUpdate" is broadly reusable.
* Refactored WithReferenceStatesFlow

* Updated javadoc for WaitForStatesToUpdate aysnc operation.

* Added network parameters property to InternalMockNetwork.

* Added min platform version capability to mock services.

* Removed erroneous chars from file.

* Made async operation internal and now call it from FlowLogic.
* Moved some transaction checking code around.

* Removed serializable annotation from referenced state and ref.
* Added reference states design doc.
* Added missing KDocs.
* Updated with reference states flow to handle consecutive update races.
* Made platform version info an inheritable thread local.
* Fixed various typos.
* Updated docs.

* Fixed race.

* Removed min platform version checks as API needs more thought.

* Added deprecation to method and supressed warnings.

* Renamed WaitForStatesToUpdate to WaitForStateConsumption.
* Fixed race in WaitForStateConsumption.

* Addressed PR comments and updated comments / KDocs.

* Reverse vault bugfixes.

* * Vault bug fixes.

* * Fixed broken test.
* Moved WaitForStateConsumption to internal package.
This commit is contained in:
Roger Willis
2018-07-25 14:06:56 +01:00
committed by GitHub
parent f5b86d32f8
commit 8207ac3222
45 changed files with 1288 additions and 111 deletions

View File

@ -256,6 +256,10 @@ public class FlowCookbookJava {
------------------------------------------*/
progressTracker.setCurrentStep(OTHER_TX_COMPONENTS);
// Reference input states are constructed from StateAndRefs.
// DOCSTART 55
ReferencedStateAndRef referenceState = ourStateAndRef.referenced();
// DOCEND 55
// Output states are constructed from scratch.
// DOCSTART 22
DummyState ourOutputState = new DummyState();

View File

@ -257,6 +257,10 @@ class InitiatorFlow(val arg1: Boolean, val arg2: Int, private val counterparty:
-----------------------------------------**/
progressTracker.currentStep = OTHER_TX_COMPONENTS
// Reference input states are constructed from StateAndRefs.
// DOCSTART 55
val referenceState: ReferencedStateAndRef<DummyState> = ourStateAndRef.referenced()
// DOCEND 55
// Output states are constructed from scratch.
// DOCSTART 22
val ourOutputState: DummyState = DummyState()