Skip to content

Commit

Permalink
Merge branch 'release/os/5.2' into vkolomeyko/e2e-flake-investigation
Browse files Browse the repository at this point in the history
  • Loading branch information
vkolomeyko authored Dec 14, 2023
2 parents ca9d473 + 26b439d commit 4b77488
Show file tree
Hide file tree
Showing 11 changed files with 127 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
Jenkinsfile @corda/blt
.ci/** @corda/blt

gradle/* @corda/blt
gradle/wrapper @corda/blt
*.toml @corda/corda5-team-leads

*.gradle @corda/blt
gradle.properties @corda/corda5-team-leads

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ private BootConfig() {
public static final String UNIQUENESS_WORKER_REST_ENDPOINT = BOOT_WORKER_SERVICE + ".endpoints.uniqueness";
public static final String PERSISTENCE_WORKER_REST_ENDPOINT = BOOT_WORKER_SERVICE + ".endpoints.persistence";
public static final String TOKEN_SELECTION_WORKER_REST_ENDPOINT = BOOT_WORKER_SERVICE + ".endpoints.tokenSelection";
public static final String P2P_LINK_MANAGER_WORKER_REST_ENDPOINT = BOOT_WORKER_SERVICE + ".endpoints.p2pLinkManager";
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"examples": [
"true",
"false"
]
],
"default": "true"
},
"corda.notary.service.flow.protocol.name": {
"description": "Name of the flow protocol used by the notary service. Valid only when one of the roles is notary.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"examples": [
"true",
"false"
]
],
"default": "true"
},
"corda.notary.service.flow.protocol.name": {
"description": "Name of the flow protocol used by the notary service. Valid only when one of the roles is notary.",
Expand Down
4 changes: 2 additions & 2 deletions 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 = 12
cordaApiRevision = 15

# Main
kotlinVersion = 1.8.21
Expand Down Expand Up @@ -34,4 +34,4 @@ org.gradle.caching = true
gradleEnterpriseUrl = https://gradle.dev.r3.com

# Kotlin build
kotlin.build.report.output=file,build_scan
kotlin.build.report.output=file,build_scan
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 4b77488

Please sign in to comment.