Create and activate a DJVM execution profile for the Node.

This commit is contained in:
Chris Rankin 2019-10-03 12:44:31 +01:00
parent 50baecf679
commit cde4db7279
2 changed files with 16 additions and 2 deletions

View File

@ -76,6 +76,11 @@ class DeterministicVerifier(
verifier.apply(sandboxTx)
}
with (result.costs) {
logger.info("Verify {} complete: allocations={}, invocations={}, jumps={}, throws={}",
ltx.id, allocations, invocations, jumps, throws)
}
result.exception?.run {
val sandboxEx = SandboxException(
Message.getMessageFromException(this),

View File

@ -38,8 +38,8 @@ class DeterministicVerifierFactoryService(
baseSandboxConfiguration = SandboxConfiguration.createFor(
analysisConfiguration = baseAnalysisConfiguration,
profile = ExecutionProfile.DEFAULT,
enableTracing = false
profile = NODE_PROFILE,
enableTracing = true
)
}
@ -58,4 +58,13 @@ class DeterministicVerifierFactoryService(
cordaSource?.close()
}
}
private companion object {
private val NODE_PROFILE = ExecutionProfile(
allocationCostThreshold = 1024 * 1024 * 1024,
invocationCostThreshold = 100_000_000,
jumpCostThreshold = 500_000_000,
throwCostThreshold = 1_000_000
)
}
}