Skip to content

Commit

Permalink
Merge branch 'release/os/5.2' into yift/core-18548/prepare-gateway-to…
Browse files Browse the repository at this point in the history
…-run-http-client

# Conflicts:
#	gradle.properties
  • Loading branch information
yift-r3 committed Dec 14, 2023
2 parents 23e62b3 + 52dc74e commit 43816f8
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 5 deletions.
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 = 15
cordaApiRevision = 14

# Main
kotlinVersion = 1.8.21
Expand Down
54 changes: 51 additions & 3 deletions ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,36 @@ net.corda.v5.ledger.utxo.FinalizationResult:
default: false
type: public abstract
returnType: net.corda.v5.ledger.utxo.transaction.UtxoSignedTransaction
net.corda.v5.ledger.utxo.NotarySignatureVerificationService:
annotations:
- DoNotImplement
type: public interface
extends: []
interface: true
methods:
verifyNotarySignatures:
annotations: []
default: false
type: public abstract
returnType: void
params:
transaction:
annotation:
- NotNull
type: net.corda.v5.ledger.common.transaction.TransactionWithMetadata
notaryKey:
annotation:
- NotNull
type: java.security.PublicKey
signatures:
annotation:
- NotNull
type: java.util.List<net.corda.v5.application.crypto.DigitalSignatureAndMetadata>
keyIdToNotaryKeys:
annotation:
- NotNull
type: "java.util.Map<String, java.util.Map<net.corda.v5.crypto.SecureHash,\
\ java.security.PublicKey>>"
net.corda.v5.ledger.utxo.StateAndRef:
annotations:
- CordaSerializable
Expand Down Expand Up @@ -526,6 +556,16 @@ net.corda.v5.ledger.utxo.UtxoLedgerService:
annotation:
- NotNull
type: net.corda.v5.application.messaging.FlowSession
verify:
annotations:
- Suspendable
default: false
type: public abstract
returnType: void
params:
ledgerTransaction:
annotation: []
type: net.corda.v5.ledger.utxo.transaction.UtxoLedgerTransaction
net.corda.v5.ledger.utxo.VisibilityChecker:
annotations:
- DoNotImplement
Expand Down Expand Up @@ -1623,6 +1663,13 @@ net.corda.v5.ledger.utxo.transaction.UtxoSignedTransaction:
default: false
type: public abstract
returnType: net.corda.v5.ledger.utxo.transaction.UtxoLedgerTransaction
params:
inputStateAndRefs:
annotation: []
type: java.util.List<net.corda.v5.ledger.utxo.StateAndRef<?>>
referenceStateAndRefs:
annotation: []
type: java.util.List<net.corda.v5.ledger.utxo.StateAndRef<?>>
net.corda.v5.ledger.utxo.transaction.UtxoTransactionBuilder:
annotations:
- DoNotImplement
Expand Down Expand Up @@ -1883,7 +1930,8 @@ net.corda.v5.ledger.utxo.transaction.filtered.UtxoFilteredTransaction:
- CordaSerializable
- DoNotImplement
type: public interface
extends: []
extends:
- net.corda.v5.ledger.common.transaction.TransactionWithMetadata
interface: true
methods:
getCommands:
Expand Down Expand Up @@ -2017,10 +2065,10 @@ net.corda.v5.ledger.utxo.transaction.filtered.UtxoFilteredTransactionBuilder:
type: public abstract
returnType: net.corda.v5.ledger.utxo.transaction.filtered.UtxoFilteredTransactionBuilder
params:
predicate:
indexes:
annotation:
- NotNull
type: java.util.function.Predicate<net.corda.v5.ledger.utxo.ContractState>
type: java.util.List<Integer>
withOutputStatesSize:
annotations:
- Suspendable
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package net.corda.v5.ledger.utxo;

import net.corda.v5.application.crypto.DigitalSignatureAndMetadata;
import net.corda.v5.base.annotations.DoNotImplement;
import net.corda.v5.crypto.SecureHash;
import net.corda.v5.ledger.common.transaction.TransactionSignatureException;
import net.corda.v5.ledger.common.transaction.TransactionWithMetadata;
import org.jetbrains.annotations.NotNull;
import java.security.PublicKey;
import java.util.List;
import java.util.Map;

@DoNotImplement
public interface NotarySignatureVerificationService {

/**
* Verifies given transaction by id is signed by the notary signatures.
*
* @param transaction that is expected to be signed over
* @param notaryKey that is expected to be signed with
* @param signatures to verify
* @param keyIdToNotaryKeys a map of keyId to notaryKeys
* @throws TransactionSignatureException if verification of given signatures failed.
*/
void verifyNotarySignatures(
@NotNull TransactionWithMetadata transaction,
@NotNull PublicKey notaryKey,
@NotNull List<DigitalSignatureAndMetadata> signatures,
@NotNull Map<String, Map<SecureHash, PublicKey>> keyIdToNotaryKeys
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public interface UtxoLedgerService {
@Suspendable
UtxoTransactionBuilder createTransactionBuilder();

/**
* Verifies {@link UtxoLedgerTransaction}.
*
* @param ledgerTransaction The {@link UtxoLedgerTransaction} to verify.
*/
@Suspendable
void verify(UtxoLedgerTransaction ledgerTransaction);

/**
* Resolves the specified {@link StateRef} instances into {@link StateAndRef} instances of the specified {@link ContractState} type.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,15 @@ public interface UtxoSignedTransaction extends TransactionWithMetadata {
@NotNull
@Suspendable
UtxoLedgerTransaction toLedgerTransaction();

/**
* Converts the current {@link UtxoSignedTransaction} into a {@link UtxoLedgerTransaction}.
*
* @param inputStateAndRefs input state and state refs associated with the {@link UtxoSignedTransaction}
* @param referenceStateAndRefs reference state and state refs
* @return Returns a {@link UtxoLedgerTransaction} from the current {@link UtxoSignedTransaction}.
*/
@NotNull
@Suspendable
UtxoLedgerTransaction toLedgerTransaction(List<StateAndRef<?>> inputStateAndRefs, List<StateAndRef<?>> referenceStateAndRefs);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.corda.v5.base.types.MemberX500Name;
import net.corda.v5.crypto.SecureHash;
import net.corda.v5.ledger.common.transaction.TransactionMetadata;
import net.corda.v5.ledger.common.transaction.TransactionWithMetadata;
import net.corda.v5.ledger.utxo.Command;
import net.corda.v5.ledger.utxo.StateAndRef;
import net.corda.v5.ledger.utxo.StateRef;
Expand Down Expand Up @@ -36,7 +37,7 @@
*/
@CordaSerializable
@DoNotImplement
public interface UtxoFilteredTransaction {
public interface UtxoFilteredTransaction extends TransactionWithMetadata {

/**
* Gets the ID of the current transaction.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.jetbrains.annotations.NotNull;

import java.security.PublicKey;
import java.util.List;
import java.util.function.Predicate;

/**
Expand Down Expand Up @@ -178,6 +179,19 @@ public interface UtxoFilteredTransactionBuilder {
@Suspendable
UtxoFilteredTransactionBuilder withOutputStates(@NotNull Predicate<ContractState> predicate);

/**
* Includes an audit proof of the output state refs component group from a {@link UtxoSignedTransaction} in the
* current {@link UtxoFilteredTransaction}.
*
* @param indexes indexes of transaction to include its output to {@link UtxoFilteredTransaction}
* @return Returns the current {@link UtxoFilteredTransaction} including the filtered output state refs component
* group.
*/
@Suspendable
@NotNull
UtxoFilteredTransactionBuilder withOutputStates(@NotNull List<Integer> indexes);


/**
* Includes a size proof of the commands component group from a {@link UtxoSignedTransaction} in the current
* {@link UtxoFilteredTransaction}.
Expand Down

0 comments on commit 43816f8

Please sign in to comment.