diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f5a90dc2cf..c320902c02 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -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 diff --git a/build.gradle b/build.gradle index e7759d4127..729514e458 100644 --- a/build.gradle +++ b/build.gradle @@ -13,9 +13,9 @@ buildscript { plugins { id 'net.corda.cordapp.cordapp-configuration' - id 'org.jetbrains.kotlin.jvm' apply false - id 'org.jetbrains.kotlin.plugin.allopen' apply false - id 'org.jetbrains.kotlin.plugin.jpa' apply false + alias libs.plugins.kotlin.jvm apply false + alias libs.plugins.kotlin.allopen apply false + alias libs.plugins.kotlin.jpa apply false alias libs.plugins.detekt apply false alias libs.plugins.snyk alias libs.plugins.grgit // used for GIT interaction (e.g. extract commit hash) @@ -52,11 +52,11 @@ def revision = { void configureKotlinForOSGi(Configuration configuration) { configuration.resolutionStrategy { dependencySubstitution { - substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk8') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk7') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-stdlib-common') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-stdlib') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-reflect') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") + substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk8') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk7') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-stdlib-common') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-stdlib') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-reflect') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") } } } diff --git a/corda-api/build.gradle b/corda-api/build.gradle index 2b6a00f9cf..80550c64ea 100644 --- a/corda-api/build.gradle +++ b/corda-api/build.gradle @@ -27,11 +27,7 @@ dependencies { api project(':serialization') api(libs.javax.persistence.api) - api('org.jetbrains.kotlin:kotlin-osgi-bundle') { - version { - require kotlinVersion - } - } + api(libs.kotlin.osgi.bundle) api('org.jetbrains:annotations') { version { require jetbrainsAnnotationsVersion diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc index ffebbeafd1..16ba046d64 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc @@ -8,6 +8,14 @@ "name": "id", "type": "string", "doc": "The id of the request corresponding to this response." + }, + { + "name": "payload", + "type": [ + "null", + "net.corda.data.p2p.crypto.AuthenticatedEncryptedDataMessage", + "net.corda.data.p2p.crypto.AuthenticatedDataMessage" + ] } ] } diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/virtualnode/VirtualNodeManagementResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/virtualnode/VirtualNodeManagementResponse.avsc index 602b1f2cc8..157aa96379 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/virtualnode/VirtualNodeManagementResponse.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/virtualnode/VirtualNodeManagementResponse.avsc @@ -18,6 +18,7 @@ "type": [ "net.corda.data.virtualnode.VirtualNodeCreateResponse", "net.corda.data.virtualnode.VirtualNodeStateChangeResponse", + "net.corda.data.virtualnode.VirtualNodeUpdateDbStatusResponse", "net.corda.data.virtualnode.VirtualNodeDBResetResponse", "net.corda.data.virtualnode.VirtualNodeManagementResponseFailure", "net.corda.data.virtualnode.VirtualNodeOperationStatusResponse" diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/virtualnode/VirtualNodeUpdateDbStatusResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/virtualnode/VirtualNodeUpdateDbStatusResponse.avsc new file mode 100644 index 0000000000..4a7ea73b20 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/virtualnode/VirtualNodeUpdateDbStatusResponse.avsc @@ -0,0 +1,19 @@ +{ + "type": "record", + "name": "VirtualNodeUpdateDbStatusResponse", + "namespace": "net.corda.data.virtualnode", + "fields": [ + { + "name": "requestId", + "type": "string" + }, + { + "name": "operationType", + "type": "string" + }, + { + "name": "virtualNodeOperationStatus", + "type": "net.corda.data.virtualnode.VirtualNodeOperationStatus" + } + ] +} diff --git a/data/config-schema/src/main/java/net/corda/schema/configuration/BootConfig.java b/data/config-schema/src/main/java/net/corda/schema/configuration/BootConfig.java index 219239b23d..555cdaec4f 100644 --- a/data/config-schema/src/main/java/net/corda/schema/configuration/BootConfig.java +++ b/data/config-schema/src/main/java/net/corda/schema/configuration/BootConfig.java @@ -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"; } diff --git a/data/config-schema/src/main/java/net/corda/schema/configuration/FlowConfig.java b/data/config-schema/src/main/java/net/corda/schema/configuration/FlowConfig.java index 8a68a0fc4a..67e75825d6 100644 --- a/data/config-schema/src/main/java/net/corda/schema/configuration/FlowConfig.java +++ b/data/config-schema/src/main/java/net/corda/schema/configuration/FlowConfig.java @@ -14,5 +14,4 @@ private FlowConfig() { public static final String PROCESSING_MAX_RETRY_DELAY = "processing.maxRetryDelay"; public static final String PROCESSING_MAX_FLOW_SLEEP_DURATION = "processing.maxFlowSleepDuration"; public static final String PROCESSING_FLOW_CLEANUP_TIME = "processing.cleanupTime"; - public static final String PROCESSING_THREAD_POOL_SIZE = "processing.poolSize"; } diff --git a/data/config-schema/src/main/java/net/corda/schema/configuration/MessagingConfig.java b/data/config-schema/src/main/java/net/corda/schema/configuration/MessagingConfig.java index ff08267671..a9f95a77dd 100644 --- a/data/config-schema/src/main/java/net/corda/schema/configuration/MessagingConfig.java +++ b/data/config-schema/src/main/java/net/corda/schema/configuration/MessagingConfig.java @@ -57,6 +57,8 @@ private Subscription() { public static final String SUBSCRIBE_RETRIES = SUBSCRIPTION + ".subscribeRetries"; public static final String COMMIT_RETRIES = SUBSCRIPTION + ".commitRetries"; public static final String PROCESSOR_TIMEOUT = SUBSCRIPTION + ".processorTimeout"; + public static final String PROCESSING_THREAD_POOL_SIZE = SUBSCRIPTION + ".mediator.poolSize"; + public static final String PROCESSING_MIN_POOL_RECORD_COUNT = SUBSCRIPTION + ".mediator.minPoolRecordCount"; } /** diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json index 14113fdcad..8e66325e83 100644 --- a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json +++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json @@ -46,6 +46,27 @@ "minimum": 1000, "maximum": 2147483647, "default": 15000 + }, + "mediator": { + "description": "Settings for the multi source mediator", + "type": "object", + "default": {}, + "properties": { + "poolSize": { + "description": "The size of the mediator event processing pool size.", + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "default": 8 + }, + "minPoolRecordCount": { + "description": "The minimum number of events in a single mediator processing pool. If the number of records polled is less than this, then the polled records are used in a single pool.", + "type": "integer", + "minimum": 1, + "maximum": 2147483647, + "default": 20 + } + } } }, "additionalProperties": false diff --git a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json index b932a5fd2e..a9dfc3fd56 100644 --- a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json +++ b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json @@ -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.", diff --git a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json index aa7a14897e..8ff0827688 100644 --- a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json +++ b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json @@ -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.", diff --git a/gradle.properties b/gradle.properties index 6bef06c4c2..a3b10d0770 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,10 +5,9 @@ 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 # Main -kotlinVersion = 1.8.21 kotlin.stdlib.default.dependency = false # These are the same annotations that Kotlin uses. @@ -34,4 +33,4 @@ org.gradle.caching = true gradleEnterpriseUrl = https://gradle.dev.r3.com # Kotlin build -kotlin.build.report.output=file,build_scan \ No newline at end of file +kotlin.build.report.output=file,build_scan diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 16ed5db761..b22110bf28 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,20 +7,20 @@ slf4jVersion = { strictly = "1.7.36" } # Main implementation dependencies avroVersion = "1.11.3" commonsCompressVersion = "1.25.0" -bouncycastleVersion = "1.73" +bouncycastleVersion = "1.77" javaxPersistenceApiVersion = "2.2" jacksonVersion = "2.16.0" osgiVersion = "8.0.0" osgiAnnotationVersion = "8.1.0" osgiSvcAnnotationVersion = "1.5.1" bndVersion = "6.4.0" -bndlibVersion = "6.4.1" +bndlibVersion = "7.0.0" # Testing assertjVersion = "3.24.2" junitVersion = "5.10.1" mockitoVersion = "5.3.0" -mockitoKotlinVersion = "4.1.0" +mockitoKotlinVersion = "5.2.1" # Plugins artifactoryVersion = "4.28.2" @@ -31,7 +31,7 @@ detektVersion = "1.23.4" dependencyCheckVersion = "0.46.0" gradleDataVersion = "1.8.2" gradleEnterpriseVersion = "3.14.1" -grgitVersion = "5.2.0" +grgitVersion = "5.2.1" snykVersion = "0.4" taskTreeVersion = "2.1.1" @@ -46,6 +46,12 @@ jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-datab jackson-kotlin = { group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version.ref = "jacksonVersion" } jackson-yaml = { group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-yaml", version.ref = "jacksonVersion" } assertj-core = { group = "org.assertj", name = "assertj-core", version.ref = "assertjVersion" } +kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlinVersion" } +kotlin-stdlib-common = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-common", version.ref = "kotlinVersion" } +kotlin-stdlib-jdk7 = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk7", version.ref = "kotlinVersion" } +kotlin-stdlib-jdk8 = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlinVersion" } +kotlin-osgi-bundle = { group = "org.jetbrains.kotlin", name = "kotlin-osgi-bundle", version.ref = "kotlinVersion" } +kotlin-reflect= { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlinVersion" } kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlinVersion" } junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junitVersion" } junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junitVersion" } @@ -80,5 +86,8 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaVersion" } gradle-data = { id = "com.gradle.common-custom-user-data-gradle-plugin", version.ref = "gradleDataVersion" } gradle-enterprise = { id = "com.gradle.enterprise", version.ref = "gradleEnterpriseVersion" } grgit = { id = "org.ajoberstar.grgit", version.ref = "grgitVersion" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlinVersion" } +kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlinVersion" } +kotlin-jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlinVersion" } snyk = { id = "io.snyk.gradle.plugin.snykplugin", version.ref = "snykVersion" } task-tree = { id = "com.dorongold.task-tree", version.ref = "taskTreeVersion" } \ No newline at end of file diff --git a/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml b/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml index 7bb6f33233..4b85005f09 100644 --- a/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml +++ b/ledger/ledger-utxo/scans/corda-ledger-utxo-5.2.0.yaml @@ -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 + keyIdToNotaryKeys: + annotation: + - NotNull + type: "java.util.Map>" net.corda.v5.ledger.utxo.StateAndRef: annotations: - CordaSerializable @@ -538,6 +568,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 sendWireTransaction: annotations: - Suspendable @@ -1650,6 +1690,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> + referenceStateAndRefs: + annotation: [] + type: java.util.List> net.corda.v5.ledger.utxo.transaction.UtxoTransactionBuilder: annotations: - DoNotImplement @@ -1910,7 +1957,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: @@ -2044,10 +2092,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 + type: java.util.List withOutputStatesSize: annotations: - Suspendable diff --git a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/NotarySignatureVerificationService.java b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/NotarySignatureVerificationService.java new file mode 100644 index 0000000000..fd280192ba --- /dev/null +++ b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/NotarySignatureVerificationService.java @@ -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 signatures, + @NotNull Map> keyIdToNotaryKeys + ); +} \ No newline at end of file diff --git a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java index ff54786680..aae86fbbdf 100644 --- a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java +++ b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/UtxoLedgerService.java @@ -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. * diff --git a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/UtxoSignedTransaction.java b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/UtxoSignedTransaction.java index c85fe7721a..f46eb02476 100644 --- a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/UtxoSignedTransaction.java +++ b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/UtxoSignedTransaction.java @@ -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> inputStateAndRefs, List> referenceStateAndRefs); } diff --git a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransaction.java b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransaction.java index 6d92b9288f..8146a3576b 100644 --- a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransaction.java +++ b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransaction.java @@ -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; @@ -36,7 +37,7 @@ */ @CordaSerializable @DoNotImplement -public interface UtxoFilteredTransaction { +public interface UtxoFilteredTransaction extends TransactionWithMetadata { /** * Gets the ID of the current transaction. diff --git a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransactionBuilder.java b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransactionBuilder.java index 663cbbd8c5..63e5f7b40c 100644 --- a/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransactionBuilder.java +++ b/ledger/ledger-utxo/src/main/java/net/corda/v5/ledger/utxo/transaction/filtered/UtxoFilteredTransactionBuilder.java @@ -9,6 +9,7 @@ import org.jetbrains.annotations.NotNull; import java.security.PublicKey; +import java.util.List; import java.util.function.Predicate; /** @@ -178,6 +179,19 @@ public interface UtxoFilteredTransactionBuilder { @Suspendable UtxoFilteredTransactionBuilder withOutputStates(@NotNull Predicate 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 indexes); + + /** * Includes a size proof of the commands component group from a {@link UtxoSignedTransaction} in the current * {@link UtxoFilteredTransaction}. diff --git a/settings.gradle b/settings.gradle index 2d8523d8ec..8c83d4a9ac 100644 --- a/settings.gradle +++ b/settings.gradle @@ -28,9 +28,6 @@ pluginManagement { plugins { id 'com.gradle.enterprise' version gradleEnterpriseVersion id 'com.gradle.common-custom-user-data-gradle-plugin' version gradleDataPlugin - id 'org.jetbrains.kotlin.jvm' version kotlinVersion - id 'org.jetbrains.kotlin.plugin.allopen' version kotlinVersion - id 'org.jetbrains.kotlin.plugin.jpa' version kotlinVersion id "com.jfrog.artifactory" version artifactoryPluginVersion } }