mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
fa025dedeb
Move Raft and BFT-Smart notaries back into node to preserve backwards compatibility. * Allow overriding full node config when using internal mock network parameters. * Make BFT-Smart notary start up in prod mode as well * Move raft & bftsmart notaries to net.corda.notary.experimental package * Make sure Raft notary handles reference state edge cases correctly. * Make sure BFT-Smart notary handles reference state edge cases correctly. * Include notary schemas in node internal schemas * Undo Raft notary table schema changes to maintain compatibility.
253 lines
7.3 KiB
Groovy
253 lines
7.3 KiB
Groovy
import net.corda.plugins.Cordform
|
|
|
|
apply plugin: 'java'
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'net.corda.plugins.quasar-utils'
|
|
apply plugin: 'net.corda.plugins.cordapp'
|
|
apply plugin: 'net.corda.plugins.cordformation'
|
|
|
|
configurations {
|
|
integrationTestCompile.extendsFrom testCompile
|
|
integrationTestRuntime.extendsFrom testRuntime
|
|
}
|
|
|
|
dependencies {
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
|
|
// Corda integration dependencies
|
|
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
|
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
|
|
cordaCompile project(':core')
|
|
cordaCompile project(':client:jfx')
|
|
cordaCompile project(':client:rpc')
|
|
cordaCompile project(':test-utils')
|
|
}
|
|
|
|
def nodeTask = tasks.getByPath(':node:capsule:assemble')
|
|
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
|
|
|
|
task deployNodes(dependsOn: ['deployNodesSingle', 'deployNodesRaft', 'deployNodesBFT', 'deployNodesCustom'])
|
|
|
|
task deployNodesSingle(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
|
|
directory file("$buildDir/nodes/nodesSingle")
|
|
nodeDefaults {
|
|
extraConfig = [h2Settings: [address: "localhost:0"]]
|
|
}
|
|
node {
|
|
name "O=Alice Corp,L=Madrid,C=ES"
|
|
p2pPort 10002
|
|
rpcSettings {
|
|
address "localhost:10003"
|
|
adminAddress "localhost:10103"
|
|
}
|
|
rpcUsers = [[user: "demou", password: "demop", permissions: ["ALL"]]]
|
|
}
|
|
node {
|
|
name "O=Notary Service,L=Zurich,C=CH"
|
|
p2pPort 10009
|
|
rpcSettings {
|
|
address "localhost:10010"
|
|
adminAddress "localhost:10110"
|
|
}
|
|
notary = [validating: true]
|
|
}
|
|
}
|
|
|
|
task deployNodesCustom(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
|
|
directory file("$buildDir/nodes/nodesCustom")
|
|
nodeDefaults {
|
|
extraConfig = [h2Settings: [address: "localhost:0"]]
|
|
}
|
|
node {
|
|
name "O=Alice Corp,L=Madrid,C=ES"
|
|
p2pPort 10002
|
|
rpcSettings {
|
|
address "localhost:10003"
|
|
adminAddress "localhost:10103"
|
|
}
|
|
rpcUsers = [[user: "demou", password: "demop", permissions: ["ALL"]]]
|
|
}
|
|
node {
|
|
name "O=Notary Service,L=Zurich,C=CH"
|
|
p2pPort 10009
|
|
rpcSettings {
|
|
address "localhost:10010"
|
|
adminAddress "localhost:10110"
|
|
}
|
|
notary = [
|
|
validating: true,
|
|
className: "net.corda.notarydemo.MyCustomValidatingNotaryService"
|
|
]
|
|
}
|
|
}
|
|
|
|
task deployNodesRaft(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
|
|
def className = ""
|
|
directory file("$buildDir/nodes/nodesRaft")
|
|
nodeDefaults {
|
|
extraConfig = [h2Settings: [address: "localhost:0"]]
|
|
}
|
|
node {
|
|
name "O=Alice Corp,L=Madrid,C=ES"
|
|
p2pPort 10002
|
|
rpcSettings {
|
|
address "localhost:10003"
|
|
adminAddress "localhost:10103"
|
|
}
|
|
rpcUsers = [[user: "demou", password: "demop", permissions: ["ALL"]]]
|
|
}
|
|
node {
|
|
name "O=Notary Service 0,L=Zurich,C=CH"
|
|
p2pPort 10009
|
|
rpcSettings {
|
|
address "localhost:10010"
|
|
adminAddress "localhost:10110"
|
|
}
|
|
notary = [
|
|
validating: true,
|
|
serviceLegalName: "O=Raft,L=Zurich,C=CH",
|
|
raft: [
|
|
nodeAddress: "localhost:10008"
|
|
]
|
|
]
|
|
}
|
|
node {
|
|
name "O=Notary Service 1,L=Zurich,C=CH"
|
|
p2pPort 10013
|
|
rpcSettings {
|
|
address "localhost:10014"
|
|
adminAddress "localhost:10114"
|
|
}
|
|
notary = [
|
|
validating: true,
|
|
serviceLegalName: "O=Raft,L=Zurich,C=CH",
|
|
raft: [
|
|
nodeAddress: "localhost:10012",
|
|
clusterAddresses: ["localhost:10008"]
|
|
]
|
|
]
|
|
}
|
|
node {
|
|
name "O=Notary Service 2,L=Zurich,C=CH"
|
|
p2pPort 10017
|
|
rpcSettings {
|
|
address "localhost:10018"
|
|
adminAddress "localhost:10118"
|
|
}
|
|
notary = [
|
|
validating: true,
|
|
serviceLegalName: "O=Raft,L=Zurich,C=CH",
|
|
raft: [
|
|
nodeAddress: "localhost:10016",
|
|
clusterAddresses: ["localhost:10008"]
|
|
]
|
|
]
|
|
}
|
|
}
|
|
|
|
task deployNodesBFT(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
|
|
def clusterAddresses = ["localhost:11000", "localhost:11010", "localhost:11020", "localhost:11030"]
|
|
directory file("$buildDir/nodes/nodesBFT")
|
|
nodeDefaults {
|
|
extraConfig = [h2Settings: [address: "localhost:0"]]
|
|
}
|
|
node {
|
|
name "O=Alice Corp,L=Madrid,C=ES"
|
|
p2pPort 10002
|
|
rpcSettings {
|
|
address "localhost:10003"
|
|
adminAddress "localhost:10103"
|
|
}
|
|
rpcUsers = [[user: "demou", password: "demop", permissions: ["ALL"]]]
|
|
}
|
|
node {
|
|
name "O=Notary Service 0,L=Zurich,C=CH"
|
|
p2pPort 10009
|
|
rpcSettings {
|
|
address "localhost:10010"
|
|
adminAddress "localhost:10110"
|
|
}
|
|
notary = [
|
|
validating: false,
|
|
serviceLegalName: "O=BFT,L=Zurich,C=CH",
|
|
bftSMaRt: [
|
|
replicaId: 0,
|
|
clusterAddresses: clusterAddresses
|
|
]
|
|
]
|
|
}
|
|
node {
|
|
name "O=Notary Service 1,L=Zurich,C=CH"
|
|
p2pPort 10013
|
|
rpcSettings {
|
|
address "localhost:10014"
|
|
adminAddress "localhost:10114"
|
|
}
|
|
notary = [
|
|
validating: false,
|
|
serviceLegalName: "O=BFT,L=Zurich,C=CH",
|
|
bftSMaRt: [
|
|
replicaId: 1,
|
|
clusterAddresses: clusterAddresses
|
|
]
|
|
]
|
|
}
|
|
node {
|
|
name "O=Notary Service 2,L=Zurich,C=CH"
|
|
p2pPort 10017
|
|
rpcSettings {
|
|
address "localhost:10018"
|
|
adminAddress "localhost:10118"
|
|
}
|
|
notary = [
|
|
validating: false,
|
|
serviceLegalName: "O=BFT,L=Zurich,C=CH",
|
|
bftSMaRt: [
|
|
replicaId: 2,
|
|
clusterAddresses: clusterAddresses
|
|
]
|
|
]
|
|
}
|
|
node {
|
|
name "O=Notary Service 3,L=Zurich,C=CH"
|
|
p2pPort 10021
|
|
rpcSettings {
|
|
address "localhost:10022"
|
|
adminAddress "localhost:10122"
|
|
}
|
|
notary = [
|
|
validating: false,
|
|
serviceLegalName: "O=BFT,L=Zurich,C=CH",
|
|
bftSMaRt: [
|
|
replicaId: 3,
|
|
clusterAddresses: clusterAddresses
|
|
]
|
|
]
|
|
}
|
|
}
|
|
|
|
task notarise(type: JavaExec) {
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
main = 'net.corda.notarydemo.NotariseKt'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Automatic-Module-Name': 'net.corda.samples.demos.notary'
|
|
)
|
|
}
|
|
}
|
|
|
|
cordapp {
|
|
targetPlatformVersion corda_platform_version.toInteger()
|
|
minimumPlatformVersion 1
|
|
workflow {
|
|
name "net/corda/samples/notary-demo"
|
|
versionId 1
|
|
vendor "R3"
|
|
licence "Open Source (Apache 2)"
|
|
}
|
|
}
|