Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DA5-22: Distribution and validation of draft transactions #1413

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f588698
initial commit - adding the send and receive functions
julia-filipczak Dec 16, 2023
c83abe5
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Dec 16, 2023
48b7ea9
updated yaml
julia-filipczak Dec 18, 2023
388a095
renaming
julia-filipczak Dec 19, 2023
dcc8d5b
addressing pr comments
julia-filipczak Dec 20, 2023
9979c6d
addressing pr comments
julia-filipczak Dec 20, 2023
01aba59
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Dec 20, 2023
81a9cf0
updating version
julia-filipczak Dec 20, 2023
f62f7da
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Dec 20, 2023
6b6cf85
fixing yaml
julia-filipczak Dec 20, 2023
d8f568a
Merge remote-tracking branch 'origin/juliaf/DA5-22-Distribution-and-V…
julia-filipczak Dec 20, 2023
b35ceb9
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Dec 21, 2023
a991108
updating version
julia-filipczak Dec 21, 2023
18b4c65
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Dec 21, 2023
d806b51
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Dec 28, 2023
4683589
updating version
julia-filipczak Dec 28, 2023
9159999
updating version
julia-filipczak Jan 8, 2024
0477bfe
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Jan 8, 2024
63d1ce1
Merge branch 'release/os/5.2' into juliaf/DA5-22-Distribution-and-Val…
julia-filipczak Jan 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cordaProductVersion = 5.2.0
# NOTE: update this each time this module contains a breaking change
## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to
## a per module property in which case module versions can change independently.
cordaApiRevision = 17
cordaApiRevision = 17-julia2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to rebase and bump the version number.
The suffix will need to be removed as well before merging.


# Main
kotlin.stdlib.default.dependency = false
Expand Down
60 changes: 50 additions & 10 deletions ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,18 @@ net.corda.v5.ledger.utxo.UtxoLedgerService:
annotation:
- NotNull
type: net.corda.v5.application.messaging.FlowSession
receiveLedgerTransaction:
annotations:
- Suspendable
- NotNull
default: false
type: public abstract
returnType: net.corda.v5.ledger.utxo.transaction.UtxoLedgerTransaction
params:
session:
annotation:
- NotNull
type: net.corda.v5.application.messaging.FlowSession
sendTransaction:
annotations:
- Suspendable
Expand Down Expand Up @@ -566,24 +578,52 @@ net.corda.v5.ledger.utxo.UtxoLedgerService:
ledgerTransaction:
annotation: []
type: net.corda.v5.ledger.utxo.transaction.UtxoLedgerTransaction
net.corda.v5.ledger.utxo.VisibilityChecker:
annotations:
- DoNotImplement
sendAsLedgerTransaction:
annotations:
- Suspendable
default: false
type: public abstract
returnType: void
params:
signedTransaction:
annotation:
- NotNull
type: net.corda.v5.ledger.utxo.transaction.UtxoSignedTransaction
sessions:
annotation:
- NotNull
type: java.util.List<net.corda.v5.application.messaging.FlowSession>
net.corda.ledger.utxo.flow.impl.transaction.factory.UtxoLedgerTransactionFactory:
annotations: []
type: public interface
extends: []
interface: true
methods:
containsMySigningKeys:
create:
annotations:
- Suspendable
default: false
type: public abstract
returnType: boolean
type: public
returnType: UtxoLedgerTransactionInternal
params:
keys:
annotation:
- NotNull
type: Iterable<java.security.PublicKey>
wireTransaction:
annotation: []
type: WireTransaction
createWithStateAndRefs:
annotations: []
default: false
type: public
returnType: UtxoLedgerTransactionInternal
params:
wireTransaction:
annotation: []
type: WireTransaction
inputStateAndRefs:
annotation: []
type: List<StateAndRef<*>>
referenceStateAndRefs:
annotation: []
type: List<StateAndRef<*>>
net.corda.v5.ledger.utxo.observer.TokenStateObserverContext:
annotations: []
type: public interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,32 @@ UtxoSignedTransaction receiveTransaction(
@NotNull FlowSession session
);

/**
* Sends the wire transaction to counterparty sessions.
julia-filipczak marked this conversation as resolved.
Show resolved Hide resolved
*
* @param sessions The counterparties who receive the transaction.
* @param signedTransaction The {@link UtxoSignedTransaction} to send.
julia-filipczak marked this conversation as resolved.
Show resolved Hide resolved
julia-filipczak marked this conversation as resolved.
Show resolved Hide resolved
* @throws CordaRuntimeException If transaction verification fails on the receiving sessions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this applies to this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this referring to this part of the flow?
val sendingTransactionResult = it.receive(Payload::class.java) if (sendingTransactionResult is Payload.Failure) { throw CordaRuntimeException( sendingTransactionResult.message ) }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That propagates back the exceptions to the receiver side.
But Transaction verification cannot fail since it does not happen in the receive.

*/
@Suspendable
void sendAsLedgerTransaction(
@NotNull UtxoSignedTransaction signedTransaction,
@NotNull List<FlowSession> sessions
);

/**
* Receives a verified transaction from the counterparty session and persists it to the vault.
julia-filipczak marked this conversation as resolved.
Show resolved Hide resolved
*
* @param session The counterparty to receive a transaction from.
* @return the {@link UtxoLedgerTransaction} received from counterparty.
* @throws CordaRuntimeException If the transaction received fails verification.
julia-filipczak marked this conversation as resolved.
Show resolved Hide resolved
*/
@NotNull
@Suspendable
UtxoLedgerTransaction receiveLedgerTransaction(
@NotNull FlowSession session
);

/**
* Creates a query object for a vault named query with the given name. This query can be executed later by calling
* {@link PagedQuery#execute()}.
Expand Down